Skip to main content

HTTP/1.1 405 Method Not Allowed when call DELETE http method

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
luckyxb77
Offline
Joined: 2012-06-12

Anyone know how to let glassfish 3.1.2 and jersey allow DELETE http method?

Below is my http DELETE request and response.

Request:
DELETE /CustomerService/rest/customers HTTP/1.1
Content-Type: application/json
Host: localhost
User-Agent: Lynx 2.8.7

Response
HTTP/1.1 405 Method Not Allowed
Date: Tue, 12 Jun 2012 09:35:50 GMT
Content-Length: 1149
Allow: POST,GET,OPTIONS,HEAD,PUT
Content-Type: text/html
Server: GlassFish Server Open Source Edition 3.1.2
X-Powered-By: Servlet/3.0 JSP/2.2 (GlassFish Server Open Source Edition 3.1.2 Java/Sun Microsystems Inc./1.6)

GlassFish Server Open Source Edition 3.1.2 - Error report


HTTP Status 405 - Method Not Allowed


type Status report

messageMethod Not Allowed

descriptionThe specified HTTP method is not allowed for the requested resource (Method Not Allowed).


GlassFish Server Open Source Edition 3.1.2