大神帮我看看为什么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<se
<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("已接收到请求");
}
按照自己的节奏前行