2011-01-03 8 views
0

私のJSPでは、enctype = "multipart/form-data"の形式でファイルをアップロードし、別のJSPでフォームの値を取得しています。ヌル値を取得しています。 plzは...いずれかが 聞く私のJSPがjspから値を取得する方法

<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 = request.getParamater("email"); 
out.println(params); 
%> 

出力は

null 
+3

'getParameter(" email ")' –

+0

スペルミス –

答えて

0

を与えますid:<form>タグ

<form name="corporateProfile" id="corporateProfile" 

、その後、nullを返しますマルチパートフォームにrequest.getParamater("email");

2

getParameterを試してみてください。 hereと記載されている4つのソリューションがあります。

関連する問題