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.
You should not define the Context in server.xml. That is a practice that has been discouraged since at least Tomcat4. Put it in a file named "admin.xml" in the TOMCAT_HOME/conf/Catalina/localhost directory.
Joined: Oct 24, 2012
I was unable to do so, because admin.xml already contains <Context /> tag that points to web application. But I have created another context file images.xml and IT WORKED . Thanks
As I understand this is safe way to share static resources like that?
You are not actually "sharing static images". Web servers are not file servers. What you are really doing is creating a third webapp whose sole purpose is to serve up the images.
It is 100% safe/legal/valid for a webpage coming from one webapp to contain URLs (links and images) that are served by other apps - even other servers in other domains. It's what keeps doubleclick.net in business (among many others).