user1315305
user1315305

Reputation: 1389

Displaying uploaded image in JSP

I'm writing a simple web application that allows users to post advertisements on the website. They can also upload images - I save them outside the webapp directory. And here is my problem - what is the simplest way to display these images inside a JSP Page? The application is deployed on Tomcat.

I will be very grateful for any advice.

Upvotes: 1

Views: 5081

Answers (1)

adarshr
adarshr

Reputation: 62603

If the path where the images are stored isn't accessible via HTTP, I suggest writing a simple servlet.

Here is an excellent example from BalusC's blog.

Upvotes: 1

Related Questions