File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.

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

SCJP 5.0, SCWCD in progress
Ben Souther

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.


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