Servlet mapping in web.xml - Java @ Desk

Tuesday, May 21, 2013

Servlet mapping in web.xml

The servlet mapping defines an association between a URL pattern and a servlet. The mapping is used to map requests to servlets.

<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>






No comments:

Post a Comment