aspose file tools*
The moose likes Tomcat and the fly likes Separate the WAR from server directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Separate the WAR from server directory" Watch "Separate the WAR from server directory" New topic
Author

Separate the WAR from server directory

Chee Seng
Greenhorn

Joined: May 30, 2004
Posts: 15
This is the thing I want to do.

e.g.
Store the WAR file in �/apps/deploy/myApp.war�
Deploy the WAR from �/apps/deploy�
Future deployment (restart server or replace file autodeploy) will take the WAR file from �/apps/deploy�.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you create a context fragment file and put it under {tomcat install}/conf/Catalina/localhost/{contextPathName}.xml you can set the docBase attribute to any path you like.

For example, if my context path were to be "myApp" the file's name would be
"myApp.xml" and would look like:


See
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
for a complete list of Context attributes.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Separate the WAR from server directory