1.一定是代码写错了。
2.检查URL
3报错如下:
.ajax02_test.html:31 GET http://localhost:8080/ajax20190726-json- 1/loadServlet011?m=hello 405 (Method Not Allowed)
onLoadTxt @ ajax02_test.html:31
onclick @ ajax02_test.html:20
4.问题情况
重写controller中的doget方法时
@Override
protected void service(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
// TODO Auto-generated method stub
super.service(arg0, arg1);
}
没有将 super.service(arg0, arg1);删除,因此出现了405错误‘’
950

被折叠的 条评论
为什么被折叠?



