Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application relative path problems

Status
Not open for further replies.

zoomboom

Programmer
Apr 2, 2003
6
IN
I'm running Tomcat 4.1 & Apache 2.0 on Win 2000. I've created a new test application (doc root) directory called "cc" under Tomcat\webapps, containing a web-inf directory. I can run JSPs by pointing at //localhost/cc/TestJSP.jsp - this works fine.

However, I've got 2 problems with my directory layout.

1. I have 4 gif images in dir cc along with my jsps. In a jsp, I want to access these images by relative path eg. <img SRC=&quot;Next.gif&quot;>. This works fine for 1 but the other 3 are not resolved. The only way I can get these 3 images to display is by keying the full directory path. I'm puzzled why 1 works but the only difference was that this was added originally when I created the app but the other 3 were added later. All 4 come from a jsp include page.

2. I'm also looking to split the root directory cc into several sub-directories to make it more managable. When I tried moving the jsps to a new directory /cc/jsp and pointing at //localhost/cc/jsp/TestJSP.jsp - the jsp was not found.What must I do for Tomcat to recognise the new directory structure?

Any assistance on the above much appreciated.

Keith

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top