1.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.
继承自HttpServlet的Servlet没有重写对于请求和响应的处理方法:doGet或doPost等方法;默认调用父类的doGet或doPost等方法;
父类HttpServlet的doGet或doPost等方法覆盖了你重写的doGet或doPost等方法;
解决方法,重写doGet或doPost等方法, 重写的doGet或doPost等方法去掉super.doGet()或super.doPost()
2.HTTP Status 500 - Error instantiating servlet class
type Exception report
message Error instantiating servlet class Three
description The server encountered an internal error that prevented it from fulfilling this request.
再刷新就会
HTTP Status 404 -
type Status report
message
description The requested resource is not available.
原因是web.xml文件中
<servlet-class>(类)</servlet-class> 类的引用不正确
这里的类引用要包含类所在的包如:test类属于test包,这里就应该写test.test