In each Javaweb application, there is a web.xml configuration file that is configured with the mapping of the servlet in the Web application, and now focuses on some of the instructions in the <servlet-mapping> section.
All servlet mapping configurations are based on Web application ContextPath, for example: if the name of the Web application is CMIs, deployed on a local TOMCAT6 server, and the port is 8080, then the contextpath of the Web application is HTTP ://localhost:8080/cmis, the path can be obtained by Request.getcontextpath (), for example, <a href= "<%=request.getcontextpath ()%>/ ESCHAINSTUDIO.JNLP "> Process customization </a>, then click the hyperlink to link to HTTP://LOCALHOST:8080/CMIS/ESCHAINSTUDIO.JNLP, now, Look at the map of the servlet,
<servlet-mapping>
<servlet-name>studiojnlpservlet</servlet-name>
<url-pattern>/eschainstudio.jnlp</url-pattern>
</servlet-mapping>
Indicates that when the requested URL is http://localhost:8080/cmis/ ESCHAINSTUDIO.JNLP, it will go to the Studiojnlpservlet servlet for processing, visible, by default, in all of the servlet's mapped configurations, are already in the <url-pattern> In front of the contextpath, for example,
<servlet-mapping>
<servlet-name>CMISMvcServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
,
means that when the requested URL is Http://localhost:8080/cmis + any content +.do, it is processed in a servlet with the name Cmismvcservlet.
Analogy