How to upload image into server
I am doing a project on Servlets and JSP's. In one of the page I have to save the details of person along with his image.
In JSP I used encryption type as multipart/form-data in form tag.
So when I make use of enctype=multipart/form-data I can't use of request.getParameter().
So what I did is I declared few string variables and assigned those variables to form fields as wrote the condition to save and upload image. Here I use commons fileupload jar for uploading image.
As of now I am able to save the details of the person in the database but not able to upload the image or even see the preview of the image.
So anybody help me in how to proceed further so that I can see the preview of the uploaded image as well as upload that image into images folder in my server( Tomcat).