Servlet eroor: HTTP method get is not supported by this URL
Error message:
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 (HTTP method get is not supported by this URL ).
Cause:
1. The servlet inherited from httpservlet does not overwrite the processing method for requests and responses: doget or dopost; by default, it calls the doget or dopost methods of the parent class;
2. The doget or dopost methods of the parent class httpservlet overwrite the doget or dopost methods you have rewritten;
Whether it is 1 or 2, the default implementation of the doget or dopost methods of the parent class httpservlet is the return status.CodeAn HTTP Error of 405 indicates that the request method for the specified resource is not allowed.
Solution:
1. Subclass override doget or dopost methods;
2. Rewrite doget or dopost methods in your extended servlert to process requests and responses. Do not call the doget or dopost methods of the parent class httpservlet, that is, remove super. doget (request, response) and super. dopost (request, response );