• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set up context path

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok quick question I have a folder on c: this is where I am saving all the files that are created for my jsp class, but how do I set the context path. Since this folder is outside the tomcat directory. the book we, plus the instructor aren't very clear on this.
 
Tony Lavalle
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh almost forgot the context path looks like this.

<Context path="/myapp"
docBase="c:\myjspapp"
debug="0"
reloadable="true" />

where would i put this.
 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For that folder on your C:\ drive, the context name also need to be the same i.e. 'myjspapp'

So, it should be something like this in your server.xml
<Context path="/myjspapp"
docBase="c:/myjspapp"
debug="0"
reloadable="true" />
 
Tony Lavalle
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using tomcat 5.5.7 so where abouts in the server.xml?
 
Tony Lavalle
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i figured it out i needed to put a file i will call it myapp.xml in the %catalina_home%\conf\cataina\localhost.

plus i need to add it to my workers2properties file in the apache server to work. thanks for the ideas.
 
Rahul Singh Khokhar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assumed you were using Tomcat 4.x as your Tomcat version wasn't mentioned earlier. Anyway, now that you have found the solution, in the older Tomcat 4.x & 3.x the context were added to the server.xml. You can do the same in Tomcat 5.5.7 but to tidy the things up with your webapps the new Tomcat places a file each for every context in the <catalina_home>\conf\Catalina\localhost folder.
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic