This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Configuration files allowable under each web application in tomcat? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Configuration files allowable under each web application in tomcat?" Watch "Configuration files allowable under each web application in tomcat?" New topic
Author

Configuration files allowable under each web application in tomcat?

Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
Can someone let me know the allowable configuration files under each web application in tomcat, for example, context.xml, web.xml, etc that are currently installed under the conf directory of the server? In order words, which of these can be specific to each web application? Thanks, much appreciated.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

There is a context descriptor for each web app.

The web.xml goes in each wen app's WEB-INF folder.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

There are 2 deployment descriptors (as they are formally called) for J2EE webapps. One is WEB-INF/web.xml. The other depends on the server being used, but for Tomcat, it's the Context, which is normally either included in the WAR as META-INF/context.xml or in the TOMCAT_HOME/conf/Catalina/xxxx directory ("xxxx" is usually, but not always "localhost").

The web.xml descriptor defines properties of the webapp itself. The Context defines properties of the webapp as it relates to the J2EE container that it is deployed in. Context is actually optional - Tomcat will synthesize a Context if you just dump a WAR into the TOMCAT_HOME/webapps directory, but it will have only default values.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
wood burning stoves
 
subject: Configuration files allowable under each web application in tomcat?