I am uploading an image file using commons fileupload, using post method. Image uploading is successful but when I try to access any other fields of the form using request.getParameter("field_name");
method I get null values of all corresponding fields as result of which I am getting Exceptions of all kind.
Here is the code of my form:
<form id="add-book" name="add-book" class="add-book" method="post" action="ServletImageUpload" enctype="multipart/form-data">
<table>
<tr>
<td>field1</td>
<td><input type="text" name="isbn" id="isbn" /></td>
</tr>
<tr>
<td>Upload image</td>
<td><input type="file" name="upload" /></td>//image upload field
</tr>
<!--rest of the form fields -->
</form>
So is the problem with the request.getParameter();
method? Why am I not able to get the values of the parameter?