大神帮我看看为什么servlet中不能打印出来前台: <form action="/UploadServlet" method="post" enctype="multipart/form-data"> 请选择图片:<input id="myfile" name="myfile" type="file"> <input type="submit" value="上传"> </form>web.xml: <servlet> <servlet-name>UploadServlet<servlet-name> <servlet-class>com.imooc.servlet.UploadServlet<servlet-class> <servlet> <servlet-mapping> <servlet-name>UploadServlet<servlet-name> <url-pattern>/UploadServlet</url-pattern> <servlet-mapping>servlet: protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // TODO Auto-generated method stub System.out.println("已接收到请求"); }
添加回答
举报
0/150
提交
取消