Sending additional data with multipart [duplicate]
问题 This question already has an answer here: How to upload files to server using JSP/Servlet? 12 answers I am using apache-commons-fileupload to get file from client to the server .(using JSP and Servlet ). JSP/HTML <form method="POST" action="GetFile" enctype="multipart/form-data"> <input type="file" name="datafile"> <input type="text" name="text1"> <input type="submit" value="Next"> </form> Servlet: GetFile System.out.println(request.getParameter("text1")); I am able to upload the file to the