File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Sony Agrawal
Ranch Hand
Posts: 143
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it by looking at the web.xml file that the container determines that the call is to the servlet ??

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Salil Vverma
Ranch Hand
Posts: 255
Hibernate Oracle Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic