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.


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.

Need Your Help

No result from options selected from a database column (php-mysql)

php mysql

In the PHP code below i want to select all the column values of a table and make them options of a select form. The result is that i dont get any options at all. Could someone help? Thanks

c++ auto does not name a type

c++ c++11 auto

I m using keyword auto in my code