• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Servlet application in directory other than Tomcat

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 67754
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, see the Tomcat documentation on setting up contexts.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic