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 Servlets are retrieved from web.xml?

 
Charitha Charitha
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am Charitha. I am new to AdvancedJava, though good at CoreJava. Can you please tell me how to run servlets, and the elements of web.xml, that is how to place the class name in web.xml, how it is retrieved during the execution of web application. It is very helpful if you explain me with a simple example.

Thanks,
Charitha.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the following entries in your web.xml file:



you can call MyServlet with the URL:

http://www.mycompany.com/myapplication/MyWonderfulServlet

the <servlet-mapping> block tells the web container what URL will be used to call your servlet.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic