aspose file tools*
The moose likes Servlets and the fly likes Where does the container look for the web.xml? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where does the container look for the web.xml?" Watch "Where does the container look for the web.xml?" New topic
Author

Where does the container look for the web.xml?

Sriram Sharma
Ranch Hand

Joined: Apr 12, 2006
Posts: 98
Where does the container look for web.xml?
I believe that the container looks for the web.xml when it starts up.
In my comp, there are lots of web.xml files.
Does the container read all the web.xml files?
Or does it read all the web.xml files inside all the WEB-INF folders present in the installed directory?

Regards,
Sriram
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 688


Hi Sriram,

web.xml is most important part of any web application and is is only one per web application. So one application has only one web.xml file.
and that is why it is called deployment descriptor. when you are deploying your web application web.xml look inside WEB-INF folder and it is always be there.

so when you start your container the tomcat first look at web.xml inside WEB-INF/web.xml and according to what developer written inside web.xml container make initially configuration and set according to web application.

for more detail refer below url.

http://nishanpatel.wordpress.com/2009/04/30/deploymentdescriptor/


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Tomcat will look inside its webapps folder, as well as anywhere that you tell it to look via context declarations in server.xml, and in the host folder of the config folder.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Where does the container look for the web.xml?