# set up context path

Tony Lavalle
Ranch Hand
Posts: 36
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
oh almost forgot the context path looks like this.

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

where would i put this.

Rahul Singh Khokhar
Ranch Hand
Posts: 36
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"

Tony Lavalle
Ranch Hand
Posts: 36
I am using tomcat 5.5.7 so where abouts in the server.xml?

Tony Lavalle
Ranch Hand
Posts: 36
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
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.