Class VelocityPageContext
java.lang.Object
javax.servlet.jsp.JspContext
javax.servlet.jsp.PageContext
org.apache.velocity.tools.view.jsp.jspimpl.VelocityPageContext
public class VelocityPageContext
extends javax.servlet.jsp.PageContext
Exposes a Velocity
Context, a request and a response as a PageContext.-
Field Summary
Fields inherited from class javax.servlet.jsp.PageContext
APPLICATION, APPLICATION_SCOPE, CONFIG, EXCEPTION, OUT, PAGE, PAGE_SCOPE, PAGECONTEXT, REQUEST, REQUEST_SCOPE, RESPONSE, SESSION, SESSION_SCOPE -
Constructor Summary
ConstructorsConstructorDescriptionVelocityPageContext(org.apache.velocity.context.Context velocityContext, Writer velocityWriter, org.apache.velocity.tools.view.ViewContext viewContext) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfindAttribute(String name) voidgetAttribute(String name) getAttribute(String name, int scope) getAttributeNamesInScope(int scope) intgetAttributesScope(String name) javax.el.ELContextjavax.servlet.jsp.el.ExpressionEvaluatorjavax.servlet.jsp.JspWritergetOut()getPage()javax.servlet.ServletRequestjavax.servlet.ServletResponsejavax.servlet.ServletConfigjavax.servlet.ServletContextjavax.servlet.http.HttpSessionjavax.servlet.jsp.el.VariableResolvervoidvoidvoidvoidvoidinitialize(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush) voidrelease()voidremoveAttribute(String name) voidremoveAttribute(String name, int scope) voidsetAttribute(String name, Object value) voidsetAttribute(String name, Object value, int scope) Methods inherited from class javax.servlet.jsp.PageContext
getErrorData, pushBodyMethods inherited from class javax.servlet.jsp.JspContext
popBody, pushBody
-
Constructor Details
-
VelocityPageContext
public VelocityPageContext(org.apache.velocity.context.Context velocityContext, Writer velocityWriter, org.apache.velocity.tools.view.ViewContext viewContext) Constructor.- Parameters:
velocityContext- The Velocity context.velocityWriter- The writer to be used when writing content.viewContext- The View context.
-
-
Method Details
-
initialize
public void initialize(javax.servlet.Servlet servlet, javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush) throws IOException, IllegalStateException, IllegalArgumentException - Specified by:
initializein classjavax.servlet.jsp.PageContext- Throws:
IOExceptionIllegalStateExceptionIllegalArgumentException
-
release
public void release()- Specified by:
releasein classjavax.servlet.jsp.PageContext
-
getSession
public javax.servlet.http.HttpSession getSession()- Specified by:
getSessionin classjavax.servlet.jsp.PageContext
-
getPage
- Specified by:
getPagein classjavax.servlet.jsp.PageContext
-
getRequest
public javax.servlet.ServletRequest getRequest()- Specified by:
getRequestin classjavax.servlet.jsp.PageContext
-
getResponse
public javax.servlet.ServletResponse getResponse()- Specified by:
getResponsein classjavax.servlet.jsp.PageContext
-
getException
- Specified by:
getExceptionin classjavax.servlet.jsp.PageContext
-
getServletConfig
public javax.servlet.ServletConfig getServletConfig()- Specified by:
getServletConfigin classjavax.servlet.jsp.PageContext
-
getServletContext
public javax.servlet.ServletContext getServletContext()- Specified by:
getServletContextin classjavax.servlet.jsp.PageContext
-
forward
- Specified by:
forwardin classjavax.servlet.jsp.PageContext- Throws:
javax.servlet.ServletExceptionIOException
-
include
- Specified by:
includein classjavax.servlet.jsp.PageContext- Throws:
javax.servlet.ServletExceptionIOException
-
include
public void include(String relativeUrlPath, boolean flush) throws javax.servlet.ServletException, IOException - Specified by:
includein classjavax.servlet.jsp.PageContext- Throws:
javax.servlet.ServletExceptionIOException
-
handlePageException
- Specified by:
handlePageExceptionin classjavax.servlet.jsp.PageContext- Throws:
javax.servlet.ServletExceptionIOException
-
handlePageException
- Specified by:
handlePageExceptionin classjavax.servlet.jsp.PageContext- Throws:
javax.servlet.ServletExceptionIOException
-
setAttribute
-
setAttribute
-
getAttribute
-
getAttribute
-
findAttribute
-
removeAttribute
- Specified by:
removeAttributein classjavax.servlet.jsp.JspContext
-
removeAttribute
- Specified by:
removeAttributein classjavax.servlet.jsp.JspContext
-
getAttributesScope
- Specified by:
getAttributesScopein classjavax.servlet.jsp.JspContext
-
getAttributeNamesInScope
- Specified by:
getAttributeNamesInScopein classjavax.servlet.jsp.JspContext
-
getOut
public javax.servlet.jsp.JspWriter getOut()- Specified by:
getOutin classjavax.servlet.jsp.JspContext
-
getExpressionEvaluator
public javax.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator()- Specified by:
getExpressionEvaluatorin classjavax.servlet.jsp.JspContext
-
getVariableResolver
public javax.servlet.jsp.el.VariableResolver getVariableResolver()- Specified by:
getVariableResolverin classjavax.servlet.jsp.JspContext
-
getELContext
public javax.el.ELContext getELContext()- Specified by:
getELContextin classjavax.servlet.jsp.JspContext
-