File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Running project outside Tomcat webapp folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Running project outside Tomcat webapp folder" Watch "Running project outside Tomcat webapp folder" New topic
Author

Running project outside Tomcat webapp folder

Mohit Jain
Ranch Hand

Joined: Jun 04, 2007
Posts: 74
Hi Ranchers

How can we run a project in Tomcat by putting its project directory somewhere else(like under C:\) other than "tomcatxx/webapp" directory.

Thanks
[ January 25, 2008: Message edited by: Mohit Jain ]

SCJP 5.0, SCWCD in progress
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can create a context node with docBase attribute that points to your app's root directory.This can be done either in tomcat/conf/server.xml (old way) or in a context fragment file under tomcat/conf/Catalina/localhost.

If you create a context fragment file, the app will be auto-deployed as soon as you place the context fragment file in the localhost directory.

See:
http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html#A%20word%20on%20Contexts


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
jQuery in Action, 2nd edition
 
subject: Running project outside Tomcat webapp folder
 
Similar Threads
Small Tomcat configuration problem
need help for context.xml
Using Eclipse with Tomcat and Sysdeo Plugin
deploy ear file without gui
Requested resource is not available - how to correct