• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Configuration files allowable under each web application in tomcat?

 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a context descriptor for each web app.

The web.xml goes in each wen app's WEB-INF folder.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic