aspose file tools*
The moose likes Tomcat and the fly likes Servlet application in directory other than Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Servlet application in directory other than Tomcat" Watch "Servlet application in directory other than Tomcat" New topic
Author

Servlet application in directory other than Tomcat

Aniket Kedari
Ranch Hand

Joined: Jan 29, 2008
Posts: 30
Hi all,
I want to know is it possible to run a servlet application if I put in a directory other than Tomcats webapps directory.
For example if I created an application on D drive and I want to run it how can I do this?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

Yes, see the Tomcat documentation on setting up contexts.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sridhar ponnusamy
Greenhorn

Joined: Sep 07, 2008
Posts: 19
use context file. like this :

<Context docBase="D:\MYAPP" path="/myapp" debug="99" reloadable="true">
</Context>

create a xml with above tag. Attribute docBase refers to app root and path refers your app context. Name this xml file like "myapp.xml" (its not hard and fast rule...but its a convention). Place it in tomcat\conf\Catalina\localhost

start the server.......

This will help you

-- sree


scjp 1.5 --> 93%<br />scwcd 1.5 --> preparing.....
 
Consider Paul's rocket mass heater.
 
subject: Servlet application in directory other than Tomcat