In my jsp am using file upload in the form of enctype="multipart/form-data" and get the form values in another jsp. am getting null value . plz...any one tell any solution....thanks in advance.. hear is my jsp coding
<html>
<head></head>
<body>
<form name="corporateProfile" method="POST"
onsubmit="return checkTheFields();" action="editUpdate.jsp"
enctype="multipart/form-data">
<table>
<tr>
<td class="bgcolor" align="right" valign="top" style="padding:3px">
<b>Upload Customer Logo</b></td>
<td colspan="3" class="bgcolor" align="left" valign="top"
style="padding:3px">
<input TYPE="file" VALUE="Browse" NAME="uploadCustomerLogo"
maxlength="1000" size="40" class="controlStyle" tabindex="17">
</td>
</tr>
<tr>
<td>
<input type="text" name="email" id="email" size="40"
class="controlStyle" maxlength="256" tabindex="11">
</td>
</tr>
</table>
</body>
</form>
</html>
editUpdate.jsp
<%
String params =开发者_StackOverflow request.getParamater("email");
out.println(params);
%>
output gives
null
getParameter
on a multipart form will return null.
There are 4 solutions listed here.
Give an id to the < form >
tag
<form name="corporateProfile" id="corporateProfile"
and then try request.getParamater("email");
精彩评论