aspose file tools*
The moose likes Tomcat and the fly likes web.xml files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "web.xml files" Watch "web.xml files" New topic
Author

web.xml files

jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
web.xml file is located in /server/webapps/manager/web.xml, /server/webapps/web-inf/web.xml,
webapps\balancer\web-inf\web.xml, webapps\root\web-inf\web.xml and many other locations.

Why are there so many web-inf directories and web.xml files ? How do I know which web.xml file to modify ? what is the purpose of so many web.xml files ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

There are no web-inf folders anywhere. It's WEB-INF. Case counts!

But to answer your question, there is a web.xml deployment descriptor for each web application.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
whats WEB-INF ? There are quite a few of WEB-INF there in Timcat directory structure. In each WEB-INF there is a web.xml file, so I thought
WEB-INF is a folder.
What do you mean by case counts ?
I could not understand what did you try to convey. If there are many web applications, then are they not supposed to be in "webapps" folder ? How come there are many "webapps" folders ?
This is confusing me.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Because the spec says so. Every independent webapplication has its own configuration.

I would start reading the servlet specification and a decent JSP/Servlet tutorial/book.

About the casing: Java is case sensitive! Read this: http://faq.javaranch.com/java/ShowSomeEffort
jignesh soni
Ranch Hand

Joined: Dec 10, 2007
Posts: 150
does it mean that there are as many WEB-INF directories, there are those many web applications ? or can one web application have more than one WEB-INF dir ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Again: one per web app.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
Note that there is a default web.xml in the ../conf directory which serves as the base for all applications individual web.xml deployment descriptors.

Study that default web.xml carefully, it is full of useful comments.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web.xml files