1. Questions
When using jquery's Ajax request Servlet, the success callback function that does not enter Ajax is returned, and the browser console displays [http/1.1 405 Method not allowed].
2. Solution
Most of the online surveys are explained below
Most Web servers, such as Apache, IIS, Nginx, and so on, do not allow static files to respond to post requests, otherwise they will return "http/1.1 405 Method not allowed" error. That is, the error page form method= "POST" is changed to "get" can be
The Ajax request method is changed, both post and get methods are not possible, but the feeling is the post and get request the problem of the way. The final problem is resolved for the following reasons:
The Servlet class that processed the request only rewritten the service method, did not rewrite the Doget and DoPost methods, and after overriding the Doget and DoPost methods, Ajax returned normally.
JQuery Ajax Request HttpServlet return [http/1.1 405 Method not allowed]