|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.velocity.context.InternalContextBase
org.apache.velocity.context.AbstractContext
org.apache.velocity.VelocityContext
org.apache.cocoon.generation.VelocityGenerator.ChainedContext
Velocity context implementation specific to the Servlet environment.
It provides the following special features:
The internalGet(String key)
method implements the following search order
for objects:
The purpose of this class is to make it easy for web designer to work with Java servlet based web applications. They do not need to be concerned with the concepts of request, session or application attributes and the live time of objects in these scopes.
Note that the put() method always puts objects into the local hashtable.
Acknowledge: the source code is borrowed from the jakarta-velocity-tools project with slight modifications.
Field Summary | |
static String |
APPLICATION
Key to the servlet context object. |
static String |
PARAMETERS
Key to the servlet context object. |
static String |
REQUEST
Key to the HTTP request object. |
static String |
RESPONSE
Key to the HTTP response object. |
static String |
SESSION
Key to the HTTP session object. |
Constructor Summary | |
VelocityGenerator.ChainedContext(org.apache.velocity.context.Context ctx,
Request request,
Response response,
Context application,
Parameters parameters)
Default constructor. |
Method Summary | |
Object |
internalGet(String key)
Looks up and returns the object with the specified key. |
Methods inherited from class org.apache.velocity.VelocityContext |
clone, internalContainsKey, internalGetKeys, internalPut, internalRemove |
Methods inherited from class org.apache.velocity.context.AbstractContext |
attachEventCartridge, containsKey, get, getChainedContext, getCurrentResource, getCurrentTemplateName, getEventCartridge, getKeys, getTemplateNameStack, icacheGet, icachePut, popCurrentTemplateName, pushCurrentTemplateName, put, remove, setCurrentResource |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String REQUEST
public static final String RESPONSE
public static final String SESSION
public static final String APPLICATION
public static final String PARAMETERS
Constructor Detail |
public VelocityGenerator.ChainedContext(org.apache.velocity.context.Context ctx, Request request, Response response, Context application, Parameters parameters)
Method Detail |
public Object internalGet(String key)
Looks up and returns the object with the specified key.
See the class documentation for more details.
key
- the key of the object requested
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |