Class RequestContent
java.lang.Object
org.deltava.util.redirect.RequestContent
- All Implemented Interfaces:
Serializable
A bean to store Servlet Request state when redirecting a command. This allows Web Site Commands to save data in the
servlet request for display on a result JSP, while at the same time using a redirect so that refreshing the result
URL does not invoke the command a second time.
- Since:
- 1.0
- Version:
- 2.6
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRequestContent
(String url) Generates a new bean from the current servlet request, and stores the URL to redirect to. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String attrName) Returns a saved servlet request attribute.Returns the saved servlet request attribute names.Returns the saved servlet request attribute values.getURL()
Returns the URL to redirect to.void
setAttribute
(String attrName, Object value) Adds a saved servlet request attribute.int
size()
Returns the number of saved servlet request attributes.
-
Constructor Details
-
RequestContent
RequestContent(String url) Generates a new bean from the current servlet request, and stores the URL to redirect to.- Parameters:
url
- the URL to forward to- See Also:
-
-
Method Details
-
getAttributeNames
-
getAttributeValues
Returns the saved servlet request attribute values.- Returns:
- a Collection of objects
-
getAttribute
-
getURL
Returns the URL to redirect to. TheRedirectCommand
will forward to this URL once it has restored the servlet request attributes.- Returns:
- the URL to forward to
-
setAttribute
-
size
public int size()Returns the number of saved servlet request attributes.- Returns:
- the number of saved attributes
-