I have html page which contains 3 file input and 3 text inputs. If I use enctype = multipart/form-data in jsp page I am not able to get the test input form fields. These values always show null. If I remove enctype from post form in jsp, I can get the text field inputs but in this case I cannot upload files. So my question is is it possible to have multiple input fields with file input and if yes how to get the text input field names??
Any help on this is appreciated..
Below is the html code
<html>
<body>
<form method="post" action="upload.jsp" enctype="multipart/form-data">
Office Name: <input type="text" name="officeName" /> <br>
Doc. Description : <input type="text" name="docDesc" /> <br>
Document 1 : <input type="file" name="doc1" /> <br>
Document 2 : <input type="file" name="doc2" /> <br>
Document 3 : <input type="file" name="doc3" /> <br>
Remarks : <input type="text" name="remarks" /> <br>
<br>
<input type="submit" value="submit" />
</form>
And i am retrieving text and file inputs as
strOffficeName=Request.getParameter("officeName");
strDocDescription=Request.getParameter("docDesc");
strDoc1Path=Request.getParameter("doc1");
strDoc2Path=Request.getParameter("doc2");
strDoc3Path=Request.getParameter("doc3");
strRemarks=Request.getParameter("remarks");