Tiny None

Greenhorn
+ Follow
since Jan 23, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tiny None

I'm trying to call a method in Spring (3.2.0) via AJAX using the following jQuery 1.6 (using the PUT method).


It attempts to invoke the following method in Spring.



FireFox responds with the following error.

HTTP Status 405 - Request method 'GET' not supported

type Status report

message Request method 'GET' not supported

description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).

Apache Tomcat/6.0.26



It works with the GET and POST methods and JSON (with Jackson-2.1.1) also works fine in other parts of the application.


If you need to see the dispatcher-servlet.xml file, the full contents is as follows.



How to make HTTP methods other than GET and POST work in Spring 3.2?

I have org.springframework.web.filter.HiddenHttpMethodFilter configured in my web.xml file and Servlet works with other HTTP methods (including GET and POST). The problem in question was also working fine with the Spring framework 3.0.2 with no configurations at all and the PUT method (i.e other than GET and POST) works with with but it doesn't appear to be the case with AJAX in Spring 3.2.
11 years ago