javax.servlet.servlet

public interface Servlet {

    public void init(ServletConfig config) throws ServletException;

    public ServletConfig getServletConfig();

     public void service(ServletRequest req, ServletResponse res)throws ServletException, IOException;

    public String getServletInfo();

    public void destroy();

}

注:destroy()的方法只执行一次在相同的servlet容器,会释放所有的资源。

 

你可能感兴趣的:(javax.servlet.servlet)