aspose file tools*
The moose likes Servlets and the fly likes How does container determines that the call is to a servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How does container determines that the call is to a servlet?" Watch "How does container determines that the call is to a servlet?" New topic
Author

How does container determines that the call is to a servlet?

Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
Is it by looking at the web.xml file that the container determines that the call is to the servlet ??

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
When you make a request then the request will be intercepted by the container and the container is programmed to read

theweb.xml file in the WEB-INF folder. And in the deployment descriptor you specify the mapping of the url to a servlet.


Rakesh Kadulkar
Salil Vverma
Ranch Hand

Joined: Sep 06, 2009
Posts: 255

Hey Sony,

You are right .As you know that for each servlet we define servlet-mapping in web.xml, container matches the url pattern fired from the browser with mentioned in web.xml and then forwards the request to that specific servlet.

The example of defining the servlet mapping to a url-pattern is as mentioned below.



Regards
Salil Verma
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How does container determines that the call is to a servlet?