Servlet service() method not getting called for CONNECT requests

后端 未结 4 958
陌清茗
陌清茗 2021-01-25 22:39

I am trying to write a forward proxy in Jetty using Servlet 3.0.

I\'ve a simple code-

public class testServlet          


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-25 23:05

    @Override
    protected void service(HttpServletRequest arg0, HttpServletResponse arg1)
            throws ServletException, IOException {
        // TODO Auto-generated method stub
        super.service(arg0, arg1);
    }
    
    @Override
    public void service(ServletRequest arg0, ServletResponse arg1)
            throws ServletException, IOException {
        // TODO Auto-generated method stub
        super.service(arg0, arg1);
    }
    

    You can compare the similarities and differences between these two methods. But these two methods are all subclasses of method parameters are different

    Or you can try to use the doPOST, doGET method.

    Can't speak English really good pain... Hehe I need to use translation tools to answer your question

提交回复
热议问题