org.apache.velocity.tools.view.jsp
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
public class JspToolContext
- extends ViewToolContext
Velocity context implementation specific to the JSP environment.
- Version:
- $Id: ViewContext.java 514727 2007-03-05 16:49:03Z nbubna $
- Author:
- Nathan Bubna
Constructor Summary |
JspToolContext(org.apache.velocity.app.VelocityEngine velocity,
javax.servlet.jsp.PageContext pageContext)
|
Method Summary |
java.lang.Object |
getAttribute(java.lang.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. |
javax.servlet.jsp.PageContext |
getPageContext()
|
protected java.lang.Object |
getServletApi(java.lang.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 void |
putToolProperties()
|
Methods inherited from class org.apache.velocity.tools.view.ViewToolContext |
addToolboxesUnderKey, containsKey, get, getRequest, getResponse, getServletContext, getSession, getToolboxes, getToolVar, getUserVar, getVelocityContext, getVelocityEngine, setToolboxKey |
Methods 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAGE_CONTEXT_KEY
public static final java.lang.String PAGE_CONTEXT_KEY
- See Also:
- Constant Field Values
pageContext
private final javax.servlet.jsp.PageContext pageContext
JspToolContext
public JspToolContext(org.apache.velocity.app.VelocityEngine velocity,
javax.servlet.jsp.PageContext pageContext)
putToolProperties
protected void putToolProperties()
- Overrides:
putToolProperties
in class ViewToolContext
getPageContext
public javax.servlet.jsp.PageContext getPageContext()
getServletApi
protected java.lang.Object getServletApi(java.lang.String key)
- Description copied from class:
ViewToolContext
- Returns the current matching servlet request, response, session,
or servlet context instance, or null if the key matches none of those
keys.
- Overrides:
getServletApi
in class ViewToolContext
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
- Description copied from class:
ViewToolContext
Searches for the named attribute in request, session (if valid),
and application scope(s) in order and returns the value associated
or null.
- Specified by:
getAttribute
in interface ViewContext
- Overrides:
getAttribute
in class ViewToolContext
Copyright (c) 2003-2007 Apache Software Foundation