地址如下:
http://127.0.0.1:8080/OnlineFood/servlet/UpdateCartMap
地址是正确的
web.xml配置如下
servlet内容:
public class UpdateCartMap extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("hahaha");
}
@Override
public void init() throws ServletException {
// TODO Auto-generated method stub
System.out.println("这里是 int方法");
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("这里是 int方法");
}
}
运行时,什么东西也没出来