Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put war file

 
sardar waqas ahmed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i am using apache-tomcat-7.0.22 and eclipse . i want to deploy war file in tomcat .should i place it in webapps folder in tomcat directory or somewhere else.thanks in advance
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each Tomcat installation contains the "How to pages" like this one which should provide you the information you are looking for
 
sardar waqas ahmed
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i cannot understand what the page is saying kindly tell me in which folder should i paste my war file
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can put the WAR wherever you want. Some places are, of course, better than others. The main constraint is that the directory that serves to contain the WAR has to be readable by Tomcat.

Tomcat has a "webapps" directory and most people use that, since they don't have to setup context information and it's a common, well-known place to hold WARs. My serious apps treat WARs as independent products, which have their own product directories and the WARs live there, instead. I use a TOMCAT_HOME/conf/Calatlina/localhost/xxxxx.xml Context file that points to that WAR using the appBase attribute.

There are roughly about 7 places and ways to deploy WARs, and that's not even including the alternatives such as using the Tomcat Manager webapp to upload and install the WAR.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic