Reprinted from Chen Meng's blog

Studying recently JavaEE lightweight framework , about servlet-mapping Medium url-partten The execution sequence of tags and web pages is not very clear , I searched many times and finally found this blog article ( Search is also a technology job , In the process of constantly understanding knowledge , In order to find the knowledge you lack more accurately ), Carry it here , Right as a reminder .

Excerpt from a project web.xml File fragment :

Access order: 1—>2—>3—>4, among 2 and 3 The value of must be the same .

url-pattern The value in the tag is to be entered in the browser address bar url, You can name it yourself , This url The access name is servlet-name median servlet, Two servlet-name The value of the tag must be the same , Because by servlet In the tag servlet-name The label maps to servlet-class Values in labels , Final visit servlet-class In the tag class.

also ,web.xml Of / It means http://localhost:8080/ + project name

and .jsp Page action, added / Absolute path http://localhost:8080/ , No addition / It's a relative path

Servlet engineering web.xml Medium servlet and servlet-mapping More about tags

  1. 【java】Servlet engineering web.xml Medium servlet and servlet-mapping label

    Excerpt from a project web.xml File fragment : Access order: 1—>2—>3—>4, among 2 and 3 The value of must be the same . url-pattern The value in the tag is to be entered in the browser address bar url, You can live on your own ...

  2. Servlet engineering web.xml Medium servlet and servlet-mapping label 《 Reprint 》

    Excerpt from a project web.xml File fragment : Access order: 1—>2—>3—>4, among 2 and 3 The value of must be the same . url-pattern The value in the tag is to be entered in the browser address bar url, You can live on your own ...

  3. How to make web.xml Medium context-param、Servlet、Listener and Filter Definition added to SpringBoot in

    Put the traditional web The project moved to SpringBoot in , Indispensable web.xml Medium context-param.Servlet.Filter and Listener And so on . about Servlet.Filter and Li ...

  4. solve servlet stay web.xml The problem of path jump in

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...

  5. JavaWeb How to be in web.xml More than one servlet

    15:34:42 <servlet> <description></description> <display-name>ListMusicServle ...

  6. 【Servlet】web.xml in welcome-file-list The role of

    Try it today struts2+ urlrewrite+sitemesh Deployment project , Results found welcome-file-list The welcome page defined in doesn't work : <welcome-file-list> & ...

  7. 【Servlet】web.xml in url-pattern Usage of

    Directory structure : contents structure [+] url-pattern Three ways of writing servlet The matching principle filter The matching principle The consequences of grammatical errors Reference article One .url-pattern Three ways of writing ...

  8. web.xml Different versions of servlet Header and version control

    Reference article : http://www.cnblogs.com/beijingstruggle/p/5461146.html http://blog.csdn.net/z69183787/article/d ...

  9. web.xml In the Servlet In order to get context-param and init-param Parameters in

    To quote :http://blog.csdn.net/yakson/article/details/9203231 web.xml There are two kinds of parameters that can be defined :1.application Parameters in range , Store in serv ...

Random recommendation

  1. Js Add the number of message prompts

    There's a new demand , Like this demand , It needs to be packaged as a plug-in The back end returns this kind of data var data = [ { key:"020506", num:5 }, { key:"0 ...

  2. Tesla P4 In the depth of learning on the cost-effective rolling all the current mass production of FPGA

    7000 The price of , 5.5T FP, 75W Less power consumption , The performance is close to M40, What kind of mass production do you have at present FPGA Can do ? Not to mention the difficulty of development and maintenance ...KU115 light PCIE+DMA+DDR4 controller+AX ...

  3. NPOI-- operation Excel It's a sharp weapon ( One )

    I'm working on a product configuration project recently , It's similar to the independent installation on Jingdong , That is to configure a complete set of products according to their own needs , It's just that what we do is the configuration of a network product , Such as router , Switches and other network equipment . After configuration, the configuration information will be exported to Excel in , ...

  4. web How does the front end make the page layout stable and standard ?

    Just started learning css+div Students of the layout , What's more confusing and difficult to write is the problem of compatibility , especially ie6 Wait for the lower version of the browser , At random, China gradually disappears and replaces , But at this stage, there are still some factors to consider . What's the reasonable layout of the webpage we wrote , ...

  5. Tree array lowbit() An explanation of the principle of function x&amp;(x^(x-1)) x&amp;-x

    Tree array lowbit() What the function asks for is the lowest order 1 So it can be calculated by bit operation The tree array passes through x&(x^(x-1)) Be able to work out lowbit Why : First set x=6, namely 110(2) So we make ...

  6. Python A collection of various derivations of

    The formula of deduction We've learned the simplest list derivations and generator expressions before . But beyond that , In fact, there are also dictionary derivations . Set derivation and so on . The following is a detailed format of derivation taking list derivation as an example , It is also applicable to other derivations . variabl ...

  7. ONDA v891 Connected to the adb debugging

    This article can be deleted .  You can see about v891root And partition articles , It introduces the driver tools . USB After the line is connected , Direct access to files , So there must be no problem with the connection itself . But , Always Windows over there MTP drive ...

  8. Vue Central event bus in development

    stay Vue During the development, a large number of components will share data , For different situations ,Vue There are corresponding solutions . such as , Passing values from parent component to child component can use props, In complex projects, values can be transferred between different modules Vuex. however , For some simple ...

  9. be based on Mysql Database hundred million data under the sub database sub table program

    Mobile Internet Era , Massive user data is generated every day , User behavior analysis based on user usage data, etc , All need to rely on data statistics and analysis , When the amount of data is small , The problem didn't come out , Database optimization is not very important , As the amount of data increases , ...

  10. hdu6038 Function Function mapping

    /** subject :hdu6038 Function link :http://acm.hdu.edu.cn/showproblem.php?pid=6038 The question : Given a a array [0,n-1], One b array [0, ...