我正在尝试运行 PUT 和 DELETE 方法,但我得到 403 禁止响应。
$http({method: 'PUT', url: 'http.....', data: $scope.datos}).success(function(data){ .....};
我正在使用 TomEE(Tomcat),并配置了 web.xml(服务器)
<servlet>
<servlet-name>default</servlet-name>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>listings</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>readonly</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>