Additional info:
BEFORE changes:
telnet 234.234.234.234 8080
Code:
Trying 234.234.234.234...
Connected to 234.234.234.234.
Escape character is '^]'.
OPTIONS / HTTP/1.1
host: 234.234.234.234
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS
Content-Length: 0
tomcat/conf/web.xml
Code:
. . . <snip> . . .
<security-constraint>
<web-resource-collection>
<web-resource-name>restricted methods</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>OPTIONS</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
<!-- No one mentions this bit in their examples to get rid of the error the rest causes -->
<security-role>
<role-name>tomcat</role-name>
</security-role>
</web-app>
webapps/theAPP/WEB-INF/web.xml
Code:
<security-constraint>
<web-resource-collection>
<web-resource-name>restricted methods</web-resource-name>
<url-pattern>/theAPP/*</url-pattern>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
<http-method>OPTIONS</http-method>
</web-resource-collection>
<auth-constraint />
</security-constraint>
<security-role>
<role-name>tomcat</role-name>
</security-role>
</web-app>
AFTER changes (the same)
telnet 234.234.234.234 8080
Code:
Trying 234.234.234.234...
Connected to 234.234.234.234.
Escape character is '^]'.
OPTIONS / HTTP/1.1
host: 234.234.234.234
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS
Content-Length: 0