Class JspToolContext
java.lang.Object
org.apache.velocity.tools.ToolContext
org.apache.velocity.tools.view.ViewToolContext
org.apache.velocity.tools.view.jsp.JspToolContext
- All Implemented Interfaces:
org.apache.velocity.context.Context,ViewContext
Velocity context implementation specific to the JSP environment.
- Version:
- $Id: ViewContext.java 514727 2007-03-05 16:49:03Z nbubna $
- Author:
- Nathan Bubna
-
Field Summary
FieldsFields inherited from class org.apache.velocity.tools.ToolContext
CATCH_EXCEPTIONS_KEY, CONTEXT_KEY, ENGINE_KEY, LOCALE_KEY, LOG_KEY, PATH_KEYFields inherited from interface org.apache.velocity.tools.view.ViewContext
APPLICATION, DEFAULT_TOOLBOX_KEY, REQUEST, RESPONSE, SERVLET_CONTEXT_KEY, SESSION -
Constructor Summary
ConstructorsConstructorDescriptionJspToolContext(org.apache.velocity.app.VelocityEngine velocity, PageContext pageContext) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String key) Searches for the named attribute in request, session (if valid), and application scope(s) in order and returns the value associated or null.PageContextprotected ObjectgetServletApi(String key) Returns the current matching servlet request, response, session, or servlet context instance, or null if the key matches none of those keys.protected voidMethods inherited from class org.apache.velocity.tools.view.ViewToolContext
addToolboxesUnderKey, containsKey, get, getRequest, getResponse, getServletContext, getSession, getToolboxes, getToolVar, getUserVar, getVelocityContext, getVelocityEngine, setToolboxKeyMethods inherited from class org.apache.velocity.tools.ToolContext
addToolbox, containsKey, findTool, getKeys, getToolbox, getToolClassMap, getToolProperties, getUserCanOverwriteTools, internalGet, keySet, put, putAll, putToolProperties, putToolProperty, putVelocityEngine, remove, setUserCanOverwriteTools
-
Field Details
-
PAGE_CONTEXT_KEY
- See Also:
-
pageContext
private final PageContext pageContext
-
-
Constructor Details
-
JspToolContext
public JspToolContext(org.apache.velocity.app.VelocityEngine velocity, PageContext pageContext)
-
-
Method Details
-
putToolProperties
protected void putToolProperties()- Overrides:
putToolPropertiesin classViewToolContext
-
getPageContext
public PageContext getPageContext() -
getServletApi
Description copied from class:ViewToolContextReturns the current matching servlet request, response, session, or servlet context instance, or null if the key matches none of those keys.- Overrides:
getServletApiin classViewToolContext
-
getAttribute
Description copied from class:ViewToolContextSearches for the named attribute in request, session (if valid), and application scope(s) in order and returns the value associated or null.
- Specified by:
getAttributein interfaceViewContext- Overrides:
getAttributein classViewToolContext
-