我正在尝试使用HTML将带有一些文本的文件发送到服务器:
<!DOCTYPE html>
<html>
<head>
<title>File Uploading Form</title>
</head>
<body>
<h3>File Upload:</h3>
Select a file to upload: <br />
<form action="UploadServlet" method="post" enctype="multipart/form-data">
<input type="file" name="file" size="50" />
<input type="hidden" name="someText" value="3" />
<input type="text" value="Upload File" />
</form>
</body>
</html>
&#13;
现在我尝试使用request.getParameter(&#34; someText&#34;)在servlet中获取它。但它返回null?任何建议或解决方案?