0

PUT and DELETE don't work, because they are not allowed, I got 405 error.

File web.xml (in folder with my project) looks like that:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
xmlns="http://java.sun.com/xml/ns/javaee"   
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
id="WebApp_ID" version="3.0"/>

Please, help me, how can I fix this problem?

In Postman I found out that only POST and GET are allowed for my server.

LuckyProgrammer
  • 79
  • 1
  • 1
  • 8
  • what is the client you are using? browser or java's httpclient? Broswer can send only GET or POST thought you configured any other methods. – Ravi MCA Jan 30 '17 at 12:00
  • I suspect that the real problem is that your Servlet is not implementing the PUT and DELETE request methods properly. – Stephen C Jan 30 '17 at 12:32
  • I use Postman, how can I configure other methods? – LuckyProgrammer Jan 30 '17 at 13:41
  • Actually, in Postman I found out that only POST and GET are allowed for my server – LuckyProgrammer Jan 30 '17 at 13:45
  • If this is a follow-up to your [other question](http://stackoverflow.com/questions/41931864/rest-http-status-405-method-not-allowed), then you need to add `JAX-RS` annotations to methods which have the correct path. The answers are all there in the other question. – Mike Jan 30 '17 at 14:00

0 Answers0