Apurv Gupta
Apurv Gupta

Reputation: 11

How to uploading an image showing it on the same page?

I am working on a JSP project where the user needs to upload an image. I need this image to be stored into the database so that it can be retrieved from the database later on. I need to show that image in the webpage itself as soon as the image has been loaded. I have tried several option like uploadbean, spring-3-mvc-fileupload-example.html, etc but nothing is working out for me.

Can you please give me a simple but effective way to do this? I am working with MySQL database.

Upvotes: 0

Views: 1557

Answers (2)

AlexR
AlexR

Reputation: 115328

Try this one: http://commons.apache.org/fileupload/. It is simple and works fine. Although Spring also has wrapper for this component and I used it either directly or via Spring and both worked fine for me.

Upvotes: 1

Ankur
Ankur

Reputation: 51100

Apurv I suggest you look at this library

http://commons.apache.org/fileupload/

The user guide is at http://commons.apache.org/fileupload/using.html

Upvotes: 1

Related Questions