aspose file tools*
The moose likes Struts and the fly likes How Servlets are retrieved from web.xml? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How Servlets are retrieved from web.xml?" Watch "How Servlets are retrieved from web.xml?" New topic
Author

How Servlets are retrieved from web.xml?

Charitha Charitha
Greenhorn

Joined: May 07, 2006
Posts: 1
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How Servlets are retrieved from web.xml?