> From: Caldarale, Charles R > Subject: RE: Deployment: do not delete specified folder > > What you want to do is not uncommon; it would be a useful enhancement > for DefaultServlet to be able to configure external directories based > on URL paths.
There is another way to do this, which I should have thought of earlier - and it doesn't involve any coding, just configuration. If you keep your static resources outside of Tomcat's directory structure, you can just declare a <Context> element that defines the location and let the existing DefaultServlet handle them. For example, if your images are in /usr/media, and you want the URL http://server/MyApp/media to reference them, create the file conf/Catalina/localhost/MyApp#media.xml containing the following: <Context docBase="/usr/media"/> That will create an additional trivial webapp whose only servlet is DefaultServlet, and you won't have to bother with symlinks or any coding of your own. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org