Package webwork.util
Class ServletValueStack
java.lang.Object
webwork.util.ValueStack
webwork.util.ServletValueStack
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/interfaces inherited from class webwork.util.ValueStack
ValueStack.ValueHolder -
Field Summary
Fields inherited from class webwork.util.ValueStack
classes, STACK_NAME, WEBWORK_VALUE_STACK_LOG_EXCEPTIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectfindAttribute(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 ObjectfindInContext(String id) Find a value by id.protected ObjectgetParameter(String aName) Get parameter directly from requeststatic ServletValueStackgetStack(javax.servlet.jsp.PageContext context) Get the value stack for a given page context.static ServletValueStackgetStack(javax.servlet.ServletRequest request) Get the value stack for a given request.voidsetContext(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, peek, popValue, pushValue, size, test, toString, unwrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ServletValueStack
public ServletValueStack()
-
-
Method Details
-
getStack
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
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
Description copied from class:ValueStackFind a value by id. This method can be overridden by subclasses to have some context concept to evaluate- Overrides:
findInContextin classValueStack- Parameters:
id- the value id.- Returns:
- value
-
findAttribute
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
Get parameter directly from request- Overrides:
getParameterin classValueStack
-