Package webwork.util

Class ServletValueStack

java.lang.Object
webwork.util.ValueStack
webwork.util.ServletValueStack
All Implemented Interfaces:
Iterable<Object>

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)
  • Constructor Details

    • ServletValueStack

      public ServletValueStack()
  • Method Details

    • getStack

      public static ServletValueStack getStack(jakarta.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(jakarta.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(jakarta.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 Object findInContext(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
      Overrides:
      findInContext in class ValueStack
      Parameters:
      id - the value id.
      Returns:
      value
    • findAttribute

      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
    • getParameter

      protected Object getParameter(String aName)
      Get parameter directly from request
      Overrides:
      getParameter in class ValueStack