Meaningless Drivel is fun!
The moose likes Tomcat and the fly likes Context Path not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context Path not working" Watch "Context Path not working" New topic

Context Path not working

Jordon Fron

Joined: Nov 01, 2005
Posts: 3
I'm using tomcat 5.5 and I cant get the context path to work.

I have a folder called phase1 in my tomcat/webapps directory and inside phase1 I have a file called 1.jsp.

I'm trying to make it so the user can go to 1.jsp by going to /secret/test instead of /phase/1.jsp

I have tried adding <Context path="/secret" docbase="phase1/test" reloadable="true"/>

to my server.xml file after the <Host....> part. When I try to load /secret/test it says 404. I tried making a context.xml file and putting in webapps/phase1/META-INF and that didnt work either.

Here are the contents of my web.xml file

<?xml version="1.0" encoding="UTF-8"?>


<!-- General Web Application Description -->





Any suggestions?
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Just a wild guess, but you're already mapping test to 1.jsp, so the ".../test" part of the docbase would seem to be incorrect.
[ November 02, 2005: Message edited by: Ulf Dittmer ]
Jordon Fron

Joined: Nov 01, 2005
Posts: 3
nope doesnt work, I tried changing docbase to /phase1 and just phase1

any other suggestions? thanks.
I agree. Here's the link:
subject: Context Path not working
It's not a secret anymore!