Tomcat在DELETE请求时发送403,尽管readonly为false

时间:2013-09-04 13:38:31

标签: java tomcat servlets http-status-code-403 http-delete

我有一个实现doDelete方法的Servlet。

当我在我的tomcat(8.0.0 RC1)上运行应用程序时,我收到403响应。我检查了有关此问题的文档(http://tomcat.apache.org/tomcat-8.0-doc/default-servlet.html),但没有变化。

我的Servlet:

@WebServlet(urlPatterns = "/api/binding/*",
     initParams = {
                    @WebInitParam(name="readonly", value="false")
                 })
public class BindingServlet extends BasicServlet {

    private static final Logger LOGGER = Logger.getLogger(BindingServlet.class);

    @Override
    protected void doDelete(HttpServletRequest req, HttpServletResponse resp) throws    ServletException {
        String request = this.getRawRequest(req);

  // some code
    }
}

我通过此页面的注释跟踪了servlet的实现:http://blog.caucho.com/2009/10/06/servlet-30-tutorial-weblistener-webservlet-webfilter-and-webinitparam/

0 个答案:

没有答案