org.apache.struts.taglib.logic

Class RedirectTag

public class RedirectTag extends TagSupport

Generate a URL-encoded redirect to the specified URI.

Version: $Rev: 54929 $ $Date: 2004-10-16 17:38:42 +0100 (Sat, 16 Oct 2004) $

Field Summary
protected Stringaction
The module-relative action (beginning with a slash) which will be called by this link
protected Stringanchor
The anchor to be added to the end of the generated hyperlink.
protected Stringforward
The logical forward name from which to retrieve the redirect URI.
protected Stringhref
The redirect URI.
protected static MessageResourcesmessages
The message resources for this package.
protected Stringmodule
The module prefix (beginning with a slash) which will be used to find the action for this link.
protected Stringname
The JSP bean name for query parameters.
protected Stringpage
The module-relative page URL (beginning with a slash) to which this redirect will be rendered.
protected StringparamId
The single-parameter request parameter name to generate.
protected StringparamName
The single-parameter JSP bean name.
protected StringparamProperty
The single-parameter JSP bean property.
protected StringparamScope
The single-parameter JSP bean scope.
protected Stringproperty
The JSP bean property name for query parameters.
protected Stringscope
The scope of the bean specified by the name property, if any.
protected booleantransaction
Include our transaction control token?
protected booleanuseLocalEncoding
Use character encoding from ServletResponse#getCharacterEncoding to get bytes of the url string for urlencoding?
Method Summary
intdoEndTag()
Render the redirect and skip the remainder of this page.
protected voiddoRedirect(String url)
Redirect to the given url converting exceptions to JspException.
intdoStartTag()
Defer generation until the end of this tag is encountered.
protected StringgenerateRedirectURL()
Calculate the url to redirect to.
StringgetAction()
StringgetAnchor()
StringgetForward()
StringgetHref()
StringgetModule()
StringgetName()
StringgetPage()
StringgetParamId()
StringgetParamName()
StringgetParamProperty()
StringgetParamScope()
StringgetProperty()
StringgetScope()
booleangetTransaction()
booleanisUseLocalEncoding()
voidrelease()
Release any acquired resources.
voidsetAction(String action)
voidsetAnchor(String anchor)
voidsetForward(String forward)
voidsetHref(String href)
voidsetModule(String module)
voidsetName(String name)
voidsetPage(String page)
voidsetParamId(String paramId)
voidsetParamName(String paramName)
voidsetParamProperty(String paramProperty)
voidsetParamScope(String paramScope)
voidsetProperty(String property)
voidsetScope(String scope)
voidsetTransaction(boolean transaction)
voidsetUseLocalEncoding(boolean b)

Field Detail

action

protected String action
The module-relative action (beginning with a slash) which will be called by this link

anchor

protected String anchor
The anchor to be added to the end of the generated hyperlink.

forward

protected String forward
The logical forward name from which to retrieve the redirect URI.

href

protected String href
The redirect URI.

messages

protected static MessageResources messages
The message resources for this package.

module

protected String module
The module prefix (beginning with a slash) which will be used to find the action for this link.

name

protected String name
The JSP bean name for query parameters.

page

protected String page
The module-relative page URL (beginning with a slash) to which this redirect will be rendered.

paramId

protected String paramId
The single-parameter request parameter name to generate.

paramName

protected String paramName
The single-parameter JSP bean name.

paramProperty

protected String paramProperty
The single-parameter JSP bean property.

paramScope

protected String paramScope
The single-parameter JSP bean scope.

property

protected String property
The JSP bean property name for query parameters.

scope

protected String scope
The scope of the bean specified by the name property, if any.

transaction

protected boolean transaction
Include our transaction control token?

useLocalEncoding

protected boolean useLocalEncoding
Use character encoding from ServletResponse#getCharacterEncoding to get bytes of the url string for urlencoding?

Method Detail

doEndTag

public int doEndTag()
Render the redirect and skip the remainder of this page.

Throws: JspException if a JSP exception has occurred

doRedirect

protected void doRedirect(String url)
Redirect to the given url converting exceptions to JspException.

Parameters: url The path to redirect to.

Throws: JspException

Since: Struts 1.2

doStartTag

public int doStartTag()
Defer generation until the end of this tag is encountered.

Throws: JspException if a JSP exception has occurred

generateRedirectURL

protected String generateRedirectURL()
Calculate the url to redirect to.

Throws: JspException

Since: Struts 1.2

getAction

public String getAction()

getAnchor

public String getAnchor()

getForward

public String getForward()

getHref

public String getHref()

getModule

public String getModule()

getName

public String getName()

getPage

public String getPage()

getParamId

public String getParamId()

getParamName

public String getParamName()

getParamProperty

public String getParamProperty()

getParamScope

public String getParamScope()

getProperty

public String getProperty()

getScope

public String getScope()

getTransaction

public boolean getTransaction()

isUseLocalEncoding

public boolean isUseLocalEncoding()

release

public void release()
Release any acquired resources.

setAction

public void setAction(String action)

setAnchor

public void setAnchor(String anchor)

setForward

public void setForward(String forward)

setHref

public void setHref(String href)

setModule

public void setModule(String module)

setName

public void setName(String name)

setPage

public void setPage(String page)

setParamId

public void setParamId(String paramId)

setParamName

public void setParamName(String paramName)

setParamProperty

public void setParamProperty(String paramProperty)

setParamScope

public void setParamScope(String paramScope)

setProperty

public void setProperty(String property)

setScope

public void setScope(String scope)

setTransaction

public void setTransaction(boolean transaction)

setUseLocalEncoding

public void setUseLocalEncoding(boolean b)
Copyright © 2000-2008 - The Apache Software Foundation