HttpJspBase 属于jasper包
packageorg.apache.jasper.runtime;
import java.io.IOException;//IO异常
import javax.servlet.ServletConfig;//小服务程序配置
import javax.servlet.ServletException;//小服务程序异常
importjavax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;//请求对象
import javax.servlet.http.HttpServletResponse;//响应对象
importjavax.servlet.jsp.HttpJspPage;
import org.apache.jasper.compiler.Localizer;//定位器
/*
*HttpJspBase本身是个抽象类,继承了httpservlet实现了httpJspPage接口
*httpJspPage接口实现了servlet(),JspPage接口(两抽象方法jspDestroy,jspInit)而本身创建jspservice(request,response)方法,用于JSP页面工作,同时继承了jsppage两个抽象方 *法又从继承的servlet接口中实现了destroy,getservletconfig,getservletinfo,init,service(五个),所以httpJsppage共实现了七个父类接口的抽象方法(jsppage两个,servlet
*五个),本身创建一个jspservice方法用于jsp页面工作
*---------------------------------------------------------------------------------------------------------------
*HttpServlet类继承了servlet接口(5个方法)和servletconfig接口(三个方法)
*/
public abstractclass HttpJspBase extends HttpServlet
implements HttpJspPage
{
private static final long serialVersionUID =1L;
public final void init(ServletConfig config)
throws ServletException
{
super.init(config);
jspInit();
_jspInit();
}
public String getServletInfo()
{
returnLocalizer.getMessage("jsp.engine.info");
}
public final void destroy()
{
jspDestroy();
_jspDestroy();
}
public final void service(HttpServletRequestrequest, HttpServletResponse response)
throws ServletException, IOException
{
_jspService(request, response);
}
public void jspInit()
{
}
public void _jspInit()
{
}
public void jspDestroy()
{
}
protected void _jspDestroy()
{
}
public abstract void_jspService(HttpServletRequest paramHttpServletRequest, HttpServletResponseparamHttpServletResponse)
throws ServletException, IOException;
}