I am writing an Application to Upload Image files in to the server. I am declaring a form giving the type as enctype="multipart/form-data"> I have declare few hidden variables also inside this form. When I am trying to get the Values of these hidden variable inside a Servlet it comes as "Null". If I remove the enctype, I could retrieve the correct values of the variable.
JSP Form :
<FORM name="form1" enctype="multipart/form-data"><!-- T1787NM -->
<input type=hidden name="stringurl" value="<%=stringurl%>">
<input type=hidden name="savetype" value="<%=ACTION%>">
<INPUT type="hidden" name="iReq" value="<%=iReq%>">
<INPUT type="File" name="FileUpload" id="fileInput">
</FORM>
Servlet :
String stringurl=(String) req.getParameter("stringurl");
other code..
I want to know how to access these variables in Servlet. Thanks in Advance.