Hi,
Here is a simple question about Servlets. I have some image files on my server folder. I just want to retrieve or view all the images which are on the server in a web browser using servlets. Uploading service runs perfectly but viewing the files is creating a problem. Please help me out.
Thanks in advance
Are the files stored somewhere where a web server can serve them via URL?
If not, you'll need to write a servlet that can read an image file from the disk, set the headers appropriately, and send the image data as the response.
Search this forum for other examples of doing just that.
You should never assume that a simple question has a simple answer, but in this case what you want is a servlet which will serve an image from the folder where you put the images. Here's an example of such a thing: Image Servlet.
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
a bit of art, as a gift, that will fit in a stocking