错误显示:
HTTP Status 405 - HTTP method GET is not supported by this URL
type Status report
message HTTP method GET is not supported by this URL
description The specified HTTP method is not allowed for the requested resource.
Apache Tomcat/8.0.33
大概的意思就是这个请求的方法不被允许。
现在来看看servlet里的doGet()方法:
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
// TODO Auto-generated method stub
super.doGet(request, response);
System.out.println("doGet");
PrintWriter out = response.getWriter();