org.apache.beehive.netui.tags.html
Class RewriteURL
Object
TagSupport
BodyTagSupport
AbstractClassicTag
RewriteURL
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, IUrlParams, INetuiTag
public class RewriteURL
- extends AbstractClassicTag
- implements IUrlParams
Allow a URL to participate in rewritting. Some containers rewrite URLs.
This tag will pass the URL attribute through the rewriters to generate a
rewritten URL before it is output into the HTML stream.
- See Also:
- Serialized Form
- Example
- In this sample, the URL attribute will be rewritten and output within
the span tags. The actual value that will be written to the rendered HTML may
change depending on the application container.
<span>URL: <netui:rewriteURL URL="foo.do"/></span>
Field Summary |
protected String |
url
|
Fields inherited from class BodyTagSupport |
bodyContent |
Fields inherited from class TagSupport |
id, pageContext |
Fields inherited from interface BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
void |
addParameter(String name,
Object value,
String facet)
This method will allow a tag that produces one or more Urls to have parameters set
on the tag. |
int |
doEndTag()
Render the end of the rewriteURL tag. |
int |
doStartTag()
Render the beginning of the rewriteURL tag. |
String |
getTagName()
Return the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
void |
setURL(String url)
Sets the URL to be rewritten. |
Methods inherited from class AbstractClassicTag |
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNearestForm, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class BodyTagSupport |
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
getParent, setPageContext, setParent |
url
protected String url
RewriteURL
public RewriteURL()
getTagName
public String getTagName()
- Return the name of the Tag.
- Specified by:
getTagName
in interface INetuiTag
- Specified by:
getTagName
in class AbstractClassicTag
- Returns:
- the name of the tag.
setURL
public void setURL(String url)
- Sets the URL to be rewritten.
- Parameters:
url
- the value of the URL that will be rewritten.
addParameter
public void addParameter(String name,
Object value,
String facet)
throws JspException
- This method will allow a tag that produces one or more Urls to have parameters set
on the tag. The name and value should be required. The facet is optional, and
allows tags producing more than one URL to have parameters set on different URLs.
- Specified by:
addParameter
in interface IUrlParams
- Parameters:
name
- The name of the parameter to be added to the URL.value
- The value of the parameter.facet
- The name of a facet for which the parameter should be added.
- Throws:
JspException
doStartTag
public int doStartTag()
throws JspException
- Render the beginning of the rewriteURL tag.
- Specified by:
doStartTag
in interface Tag
- Overrides:
doStartTag
in class BodyTagSupport
- Throws:
JspException
- if a JSP exception has occurred
doEndTag
public int doEndTag()
throws JspException
- Render the end of the rewriteURL tag.
- Specified by:
doEndTag
in interface Tag
- Overrides:
doEndTag
in class BodyTagSupport
- Throws:
JspException
- if a JSP exception has occurred
localRelease
protected void localRelease()
- Release any acquired resources.
- Overrides:
localRelease
in class AbstractClassicTag