Choose the correct answer:
-
HTTP PUT & DELETE method can be disabled in web.xml from the below code: <Web-resource-collection> <web-resource-name>Disallowed Location</web-resource-name> <url-pattern>/*</url-pattern> <http-method>PUT</http-m
-
HTTP PUT & DELETE methods are disabled by default
-
HTTP PUT & DELETE methods should not be disabled
-
HTTP PUT & DELETE methods cannot be disabled
HTTP methods like PUT and DELETE can be restricted in web.xml using security-constraint with http-method elements. Option A shows the correct syntax for disabling PUT (though truncated in the content). PUT and DELETE are enabled by default in servlet containers and should be explicitly disabled if not needed for REST APIs.
HTTP methods like PUT and DELETE can be locked down in web.xml using a / block that lists the specific `` values to restrict for a given URL pattern, denying any role access to those methods. This is a standard servlet-container mechanism for method-level access control, and it's not something that's disabled by default or unable to be configured.