|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Velocity context implementation specific to the Servlet environment.It provides the following special features:puts the request, response, session, and servlet context objects into the Velocity context for direct access, and keeps them read-onlysupports a read-only toolbox of view toolsauto-searches servlet request attributes, session attributes and servlet context attribues for objectsThe {@link #internalGet(String key)} method implements the following search order for objects:servlet request, servlet response, servlet session, servlet contexttoolboxlocal hashtable of objects (traditional use)servlet request attribues, servlet session attribute, servlet context attributesThe 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.
Field Summary | |
---|---|
string |
APPLICATION
Key to the HttpContext application object. |
string |
CONTEXT
Key to the HttpContext object. |
string |
REQUEST
Key to the HTTP request object. |
string |
RESPONSE
Key to the HTTP response object. |
string |
SESSION
Key to the HTTP session object. |
Constructor Summary | |
---|---|
ChainedContext(NVelocity.Context.IContext ctx, System.Web.HttpContext httpContext) Default constructor. |
Property Summary | |
---|---|
System.Web.HttpContext |
HttpContext
Returns the servlet context. |
NVelocity.Http.Context.ToolboxContext |
Toolbox
Sets the toolbox of view tools. |
NVelocity.Context.IContext |
VelocityContext
Returns a reference to the Velocity context (this object). |
Properties inherited from class NVelocity.Context.AbstractContext |
---|
ChainedContext, Keys |
Properties inherited from class NVelocity.Context.InternalContextBase |
---|
CurrentResource, CurrentTemplateName, EventCartridge, TemplateNameStack |
Method Summary | |
---|---|
object |
InternalGet(string key) Looks up and returns the object with the specified key.See the class documentation for more details. |
Methods inherited from class NVelocity.VelocityContext |
---|
Clone, InternalContainsKey, InternalGetKeys, InternalPut, InternalRemove |
Methods inherited from class NVelocity.Context.AbstractContext |
---|
ContainsKey, Get, Put, Remove |
Methods inherited from class NVelocity.Context.InternalContextBase |
---|
AttachEventCartridge, ICacheGet, ICachePut, PopCurrentTemplateName, PushCurrentTemplateName |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
public string APPLICATION
Key to the HttpContext application object.
public string CONTEXT
Key to the HttpContext object.
public string REQUEST
Key to the HTTP request object.
public string RESPONSE
Key to the HTTP response object.
public string SESSION
Key to the HTTP session object.
Constructor Detail |
---|
public ChainedContext(NVelocity.Context.IContext ctx, System.Web.HttpContext httpContext)
Default constructor.
Property Detail |
---|
public System.Web.HttpContext HttpContext
Returns the servlet context.
public NVelocity.Http.Context.ToolboxContext Toolbox
Sets the toolbox of view tools.
Parameters:
box
- toolbox of view toolspublic NVelocity.Context.IContext VelocityContext
Returns a reference to the Velocity context (this object).
Method Detail |
---|
public object InternalGet(string key)
Looks up and returns the object with the specified key.See the class documentation for more details.
Parameters:
key
- the key of the object requested
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |