JspFactoryImplpublic class JspFactoryImpl extends javax.servlet.jsp.JspFactory Implementation of JspFactory. |
Fields Summary |
---|
private org.apache.juli.logging.Log | log | private static final String | SPEC_VERSION | private static final boolean | USE_POOL | private static final int | POOL_SIZE | private ThreadLocal | localPool |
Methods Summary |
---|
public javax.servlet.jsp.JspEngineInfo | getEngineInfo()
return new JspEngineInfo() {
public String getSpecificationVersion() {
return SPEC_VERSION;
}
};
| public javax.servlet.jsp.JspApplicationContext | getJspApplicationContext(javax.servlet.ServletContext context)
return JspApplicationContextImpl.getInstance(context);
| public javax.servlet.jsp.PageContext | getPageContext(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoflush)
if( Constants.IS_SECURITY_ENABLED ) {
PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
(JspFactoryImpl)this, servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
return (PageContext)AccessController.doPrivileged(dp);
} else {
return internalGetPageContext(servlet, request, response,
errorPageURL, needsSession,
bufferSize, autoflush);
}
| private javax.servlet.jsp.PageContext | internalGetPageContext(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, java.lang.String errorPageURL, boolean needsSession, int bufferSize, boolean autoflush)
try {
PageContext pc;
if (USE_POOL) {
PageContextPool pool = localPool.get();
if (pool == null) {
pool = new PageContextPool();
localPool.set(pool);
}
pc = pool.get();
if (pc == null) {
pc = new PageContextImpl();
}
} else {
pc = new PageContextImpl();
}
pc.initialize(servlet, request, response, errorPageURL,
needsSession, bufferSize, autoflush);
return pc;
} catch (Throwable ex) {
/* FIXME: need to do something reasonable here!! */
log.fatal("Exception initializing page context", ex);
return null;
}
| private void | internalReleasePageContext(javax.servlet.jsp.PageContext pc)
pc.release();
if (USE_POOL && (pc instanceof PageContextImpl)) {
localPool.get().put(pc);
}
| public void | releasePageContext(javax.servlet.jsp.PageContext pc)
if( pc == null )
return;
if( Constants.IS_SECURITY_ENABLED ) {
PrivilegedReleasePageContext dp = new PrivilegedReleasePageContext(
(JspFactoryImpl)this,pc);
AccessController.doPrivileged(dp);
} else {
internalReleasePageContext(pc);
}
|
|