com.ora.jsp.tags
Class ForwardTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
com.ora.jsp.tags.ForwardTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.IterationTag, ParamParent, java.io.Serializable, javax.servlet.jsp.tagext.Tag
- public class ForwardTag
- extends javax.servlet.jsp.tagext.TagSupport
- implements ParamParent
This class is a custom action for sending a forwarding request,
with possible parameter values URL encoded.
It's a replacement for the standard <jsp:forward>
standard action, with the exception that it supports an EL expression
as the page
attribute value, and nested
<ora:param>
actions for additional parameters.
- Version:
- 2.0
- Author:
- Hans Bergsten, Gefion software
- See Also:
- Serialized Form
Nested Class Summary |
(package private) class |
ForwardTag.Param
This is a helper class that holds the name and value of a
parameter. |
Field Summary |
private java.lang.String |
pageEL
|
private java.util.ArrayList |
params
|
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
void |
addParam(java.lang.String name,
java.lang.String value)
Adds a parameter name and value. |
int |
doEndTag()
Appends possible URL encoded parameters to the main URI
and forwards to the target page. |
int |
doStartTag()
Override the default implementation so that possible
param actions in the body are processed. |
void |
release()
Releases all instance variables. |
void |
setPage(java.lang.String page)
Sets the page attribute. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pageEL
private java.lang.String pageEL
params
private java.util.ArrayList params
ForwardTag
public ForwardTag()
setPage
public void setPage(java.lang.String page)
- Sets the page attribute.
- Parameters:
page
- the page URL to redirect to
addParam
public void addParam(java.lang.String name,
java.lang.String value)
- Adds a parameter name and value. This method is called by param
tags in the action body.
- Specified by:
addParam
in interface ParamParent
- Parameters:
name
- the parameter namevalue
- the URL encoded parameter value
doStartTag
public int doStartTag()
- Override the default implementation so that possible
param actions in the body are processed.
- Specified by:
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Appends possible URL encoded parameters to the main URI
and forwards to the target page. Returns SKIP_PAGE
to abort the processing of the rest of the page.
- Specified by:
doEndTag
in interface javax.servlet.jsp.tagext.Tag
- Throws:
javax.servlet.jsp.JspException
release
public void release()
- Releases all instance variables.
- Specified by:
release
in interface javax.servlet.jsp.tagext.Tag