July 27, 2012

How to upload image file in java web application [java server page and servlets]

How to upload a Image file from jsp page to servlet 

This is a small example of java web application

 <form action="UserPicsServlet" enctype="multipart/form-data" method="post">
       <td><input name="filePath" type="file" /></td>
        <td><input name="btnSubmit" type="submit" value="SAVE" /></td>
       <td><input name="btnSubmit" type="reset" value="Cancel" /></td>
Thanking you....

Facebook comments