File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multilevel context path for ROOT app does not work

 
anton moiseev
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic