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">
<table>
       <tbody>
<tr>
       <td><input name="filePath" type="file" /></td>
      
        </tr>
<tr></tr>
<tr>
        <td><input name="btnSubmit" type="submit" value="SAVE" /></td>
       <td><input name="btnSubmit" type="reset" value="Cancel" /></td>
       </tr>
</tbody></table>
</form>
Thanking you....

No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments