my dog learned polymorphism
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
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 56224
    
  13

There is a context descriptor for each web app.

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14491
    
    7

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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Configuration files allowable under each web application in tomcat?
 
Similar Threads
request URI doubt?
Customize 404 errors in Apache Tomcat
Error while deploying a standalone application
Eclispe's Dynamic Web Project
Configuration files allowed under each web application in tomcat