aspose file tools*
The moose likes Tomcat and the fly likes Multilevel context path for ROOT app does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multilevel context path for ROOT app does not work" Watch "Multilevel context path for ROOT app does not work" New topic
Author

Multilevel context path for ROOT app does not work

anton moiseev
Greenhorn

Joined: Dec 12, 2010
Posts: 7
Hi, I want to make external dir outside tomcat webapps to be available from web.

To do this, I use the common way - create context file "apache-tomcat/conf/Catalina/localhost/testapp#images.xml" with contents:


So filesystem file "/files/images/img1.png" can be accessed from web as "http://localhost:8080/testapp/images/img1.png"

Until now this works ok. Now I want to make same trick for the ROOT webapp. As it is said here: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html , ROOT application context can be defined as "apache-tomcat/conf/Catalina/localhost/ROOT.xml".

So, I just renamed "apache-tomcat/conf/Catalina/localhost/testapp#images.xml" to "apache-tomcat/conf/Catalina/localhost/ROOT#images.xml" and was expecting that I can now access the files from web with "http://localhost:8080/images/img1.png" in the same way as it worked for "testapp", but this did not work this time - tomcat returns resource not found page.

I have apache-tomcat-7.0.5 running on linux.

thank's
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multilevel context path for ROOT app does not work
 
Similar Threads
UrlRewrite Rule works on tomcat 4.1.34 but fails on tomcat 5.0.28
how to use the servlet in tomcat??
How to setup the same application (multiple instances) running on different ports under Tomcat 6.0.x
Paths in Tomcat standalone mode
Jsp retrieve Image