webwork.util
Class ServletValueStack

java.lang.Object
  extended bywebwork.util.ValueStack
      extended bywebwork.util.ServletValueStack

public class ServletValueStack
extends ValueStack

Value stack implementation for a servlet based scenario.

Version:
$Revision: 1 $
Author:
Rickard Öberg (rickard@middleware-company.com), Maurice C. Parker (maurice@vineyardenterprise.com)

Nested Class Summary
 
Nested classes inherited from class webwork.util.ValueStack
ValueStack.ValueHolder
 
Field Summary
 
Fields inherited from class webwork.util.ValueStack
classes, STACK_NAME
 
Constructor Summary
ServletValueStack()
           
 
Method Summary
protected  java.lang.Object findAttribute(java.lang.String id)
          Mimic the behaviour of the findAttribute method in the PageContext This method is used when there is no pageContext set for this stack and the findInContext method is called.
protected  java.lang.Object findInContext(java.lang.String id)
          Find a value by id.
protected  java.lang.Object getParameter(java.lang.String aName)
          Get parameter directly from request
static ServletValueStack getStack(javax.servlet.jsp.PageContext context)
          Get the value stack for a given page context.
static ServletValueStack getStack(javax.servlet.ServletRequest request)
          Get the value stack for a given request.
 void setContext(javax.servlet.jsp.PageContext context)
          Set the page context that should be associated with this stack.
 
Methods inherited from class webwork.util.ValueStack
clearMethods, findMethod, findValue, findValue, getMethod, isEmpty, iterator, popValue, pushValue, size, test, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServletValueStack

public ServletValueStack()
Method Detail

getStack

public static ServletValueStack getStack(javax.servlet.ServletRequest request)
Get the value stack for a given request. If there is no stack available, create one.

Parameters:
request - the request for which a stack shall be returned
Returns:
the value stack

getStack

public static ServletValueStack getStack(javax.servlet.jsp.PageContext context)
Get the value stack for a given page context. If there is no stack available, create one.

Parameters:
context - the page context to associate with the stack
Returns:
the value stack

setContext

public void setContext(javax.servlet.jsp.PageContext context)
Set the page context that should be associated with this stack. This is called for each use of the stack in a JSP context.


findInContext

protected java.lang.Object findInContext(java.lang.String id)
Description copied from class: ValueStack
Find a value by id. This method can be overridden by subclasses to have some context concept to evaluate @identified expressions.

Overrides:
findInContext in class ValueStack

findAttribute

protected java.lang.Object findAttribute(java.lang.String id)
Mimic the behaviour of the findAttribute method in the PageContext This method is used when there is no pageContext set for this stack and the findInContext method is called. Look for the attribute in the request, session and application scope

Returns:
found value or null

getParameter

protected java.lang.Object getParameter(java.lang.String aName)
Get parameter directly from request

Overrides:
getParameter in class ValueStack


Copyright © 2001-2003 WebWork All Rights Reserved.