This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet application in directory other than Tomcat

 
Aniket Kedari
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, see the Tomcat documentation on setting up contexts.
 
sridhar ponnusamy
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic