Input TYPE TEXT Value from JSP form (enctype=“multipart/form-data”) returns null [duplicate]
- 阅读更多 关于 Input TYPE TEXT Value from JSP form (enctype=“multipart/form-data”) returns null [duplicate]
This question already has an answer here: How to upload files to server using JSP/Servlet? 12 answers I need to upload an image: <form method="post" action="hi.iq/register.jsp" enctype="multipart/form-data"> Name: <input type="text" name="name" value="J.Doe"> file: <input type="file" name="file-upload"> <input type="submit"> </form> In my servlet I gave response.setContentType("text/html"); PrintWriter out = response.getWriter(); String name = request.getParameter("name"); System.out.println("user_id========= "+name); but the value of name is returned as NULL . Pls Help Try <input type="text"