RESTful style put error HTTP Status 405-jsps only permit GET POST or HEAD

Source: Internet
Author: User

When this occurs, the JSP view that the controller has return is not found, so the request only allows get, POST, HEAD.

Solution Solutions

1. If you return to the view, change the input value of name _method in the form to get, POST, HEAD, cannot use put, delete, etc.

2. If a string is returned, add @responsebody. (You can convert the returned object into the body area where the JSON data is written into the response).

RESTful style put error HTTP Status 405-jsps only permit GET POST or HEAD

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.