I am using httpd with
tomcat and mod_jk
My webapp url is something like:
http://localhost:8080/myapp
- which picks up the
JSP from /home/webapps/myapp
But when someone else a url such as
http://localhost:8080/myapp/assets/1.gif, or
http://localhost:8080/myapp/assets/2.jpg
- I want tomcat to retrieve the gif from a different directory on the server -
/usr/share/my_images/1.gif and
/usr/share/my_images/2.jpg
To do this, i created a file called myapp#assets.xml, and placed it in
/usr/share/tomcat6/conf/Catalina/localhost
The content of myapp#assets.xml are -
<Context docbase="/usr/share/my_images/" path="/assets/*"></Context>
But this is not working, and the server just does not find
http://localhost:8080/myapp/assets/1.gif.
What am i doing wrong?