JspFactory fac=JspFactory.getDefaultFactory();
PageContext pageContext=fac.getPageContext(this, request,response, null, false, JspWriter.DEFAULT_BUFFER, true); 请问哪位老哥知道这个是什么意思啊?
JspFactory不是javax.servlet.jsp.JspFactory对象吗?那为什么在servlet Api文档里找不到这个类相关说明呢?

解决方案 »

  1.   

    JSP API
    这个是要到JSP的API中找的~~getPageContext
    public abstract PageContext getPageContext(javax.servlet.Servlet servlet,
                                               javax.servlet.ServletRequest request,
                                               javax.servlet.ServletResponse response,
                                               java.lang.String errorPageURL,
                                               boolean needsSession,
                                               int buffer,
                                               boolean autoflush)obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response. This method is typically called early in the processing of the _jspService() method of a JSP implementation class in order to obtain a PageContext object for the request being processed. Invoking this method shall result in the PageContext.initialize() method being invoked. The PageContext returned is properly initialized. All PageContext objects obtained via this method shall be released by invoking releasePageContext(). 
    Parameters:
    servlet - the requesting servlet
    request - the current request pending on the servlet
    response - the current response pending on the servlet
    errorPageURL - the URL of the error page for the requesting JSP, or null
    needsSession - true if the JSP participates in a session
    buffer - size of buffer in bytes, PageContext.NO_BUFFER if no buffer, PageContext.DEFAULT_BUFFER if implementation default.
    autoflush - should the buffer autoflush to the output stream on buffer overflow, or throw an IOException? 
    Returns:
    the page context
    See Also:
    PageContext