I would like to ask, is it possible for us to map a folder in web application?
For example, my web application contains a /images folder which contain all images used in my application. So, when I need to load a image from my jsp page, i would only required to specify something like images/myPic.gif instead of ../images/myPic.gif (note that ../images/myPic.gif is depend on how deep is the jsp file from the images folder).
Any response will be much appreciated. thanks
You have already been wanred about your display name here.
Please see the link and update your profile with a valid display name soon, since accounts with invalid display names get deleted, often without warning.
Sorry for my nickname, actually i was not notified by JavaRanch in the previous forum at http://www.coderanch.com/t/75855/Websphere/Storage-Websphere-Embedded-JMS-Provider.
I've taken and change my displayed name to 'huang' which is my surname, is it ok?
Thanks for the suggestion, i will give it try...wish me good luck...:-)
Originally posted by David O'Meara:
There are a number of solutions, butI think the one you're looking for is to cretae a Servelt as a 'virtual directory'. To do this, you create a Servlet mapping which looks like a directory, then get the servlet to query the URL and serve the actual image. ie you create a mapping as */images/ and */images/* to your servlet, but I can't remember the actual method for getting the rest
SimpleStream at http://simple.souther.us does this. In the example, I'm serving the images from a directory under WEB-INF. If you want to use it in production, you'll need to make sure you have mime types listed for every extension you plan to use. You'll see in in the servlet code.
[ January 16, 2005: Message edited by: Ben Souther ]