I would do this by defining a system property which you can use to define the directory containing the images. I would write a servlet that uses the directory location and image file name, opens the image file and writes it to the repsonse output. The servlet will also have to change the response mime type to correspond to the image type.
Search the net for "return image from servlet", there are lots of examples.
Hi Pete thanks for your quick reply, but won't this be very slow and bad design since my jsp will be calling this servlet several times on the same page...Any other suggestions ? Would creating a different http server or ftp server to server the images help or be faster ?
This is basically the same algorithm that a web server uses to serve images that are within the web app. Your JSP should be writing <img> tags into the HTML output and let the browser request the separate images, usally in parallel. Thus multiple instances of the servlet will be running, each processing a different image request.