This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Multilevel context path for ROOT app does not work
 
It's not a secret anymore!