wood burning stoves
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

Win a copy of Building Microservices this week in the Design forum!
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
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Running project outside Tomcat webapp folder
jQuery in Action, 3rd edition