public class

ServletValueStack

extends ValueStack
java.lang.Object
   ↳ webwork.util.ValueStack
     ↳ webwork.util.ServletValueStack

Class Overview

Value stack implementation for a servlet based scenario.

Summary

[Expand]
Inherited Constants
From class webwork.util.ValueStack
[Expand]
Inherited Fields
From class webwork.util.ValueStack
Public Constructors
ServletValueStack()
Public Methods
static ServletValueStack getStack(PageContext context)
Get the value stack for a given page context.
static ServletValueStack getStack(ServletRequest request)
Get the value stack for a given request.
void setContext(PageContext context)
Set the page context that should be associated with this stack.
Protected Methods
Object findAttribute(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.
Object findInContext(String id)
Find a value by id.
Object getParameter(String aName)
Get parameter directly from request
[Expand]
Inherited Methods
From class webwork.util.ValueStack
From class java.lang.Object
From interface java.lang.Iterable

Public Constructors

public ServletValueStack ()

Public Methods

public static ServletValueStack getStack (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

public static ServletValueStack getStack (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

public void setContext (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.

Protected Methods

protected Object findAttribute (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

protected Object findInContext (String id)

Find a value by id. This method can be overridden by subclasses to have some context concept to evaluate

Parameters
id the value id.
Returns
  • value

protected Object getParameter (String aName)

Get parameter directly from request