Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

What is servlet mapping?
Servlet mapping controls how you access a servlet. Servlet mapping specifies the web container of which java servlet should be invoked for a url given by client. For this purpose web container uses the Deployment Decriptor (web.xml) file. Servlets are registered and configured as a part of a Web Application. To register a servlet, you add several entries to the Web Application deployment descriptor.

Servlet Mapping : 

<servlet>
  <servlet-name>MyServlet</servlet-name>
  <servlet-class>myservlets.MappingExample</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>MyServlet</servlet-name>
  <url-pattern>com/*</url-pattern>
</servlet-mapping>

A developer can map all the servelts inside its web application.
Posted By: Name:Rajesh Kr URL: What is servlet mapping?