webwork.action.standard
Class Redirect

java.lang.Object
  extended bywebwork.action.ActionSupport
      extended bywebwork.action.standard.Redirect
All Implemented Interfaces:
Action, IllegalArgumentAware, java.io.Serializable, ServletResponseAware
Direct Known Subclasses:
Referrer

public class Redirect
extends ActionSupport
implements ServletResponseAware

Redirect to a given URL. Do not map any view to this action.

Version:
$Revision: 1.11 $
Author:
Rickard Öberg (rickard@middleware-company.com)
See Also:
, Serialized Form

Field Summary
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages, log
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
Redirect()
           
 
Method Summary
protected  java.lang.String doExecute()
          Redirect to URL
 java.lang.String getUrl()
           
 void setServletResponse(javax.servlet.http.HttpServletResponse aResponse)
           
 void setUrl(java.lang.String aUrl)
          URL to redirect to
protected  void validate()
          Do validation.
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, addIllegalArgumentException, doDefault, doValidation, execute, getActionName, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getLocale, getPropertyEditorMessage, getText, getTexts, getTexts, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Redirect

public Redirect()
Method Detail

setServletResponse

public void setServletResponse(javax.servlet.http.HttpServletResponse aResponse)
Specified by:
setServletResponse in interface ServletResponseAware

setUrl

public void setUrl(java.lang.String aUrl)
URL to redirect to


getUrl

public java.lang.String getUrl()

validate

protected void validate()
                 throws ResultException
Description copied from class: ActionSupport
Do validation. This method is called implicitly before executing doExecute(), but must be called explicitly from within command implementation methods. The actual validation should be done by overriding the doValidation() method. If any errors have been registered by doValidation() this method will throw ResultException() which should simply be passed through.

Overrides:
validate in class ActionSupport
Throws:
ResultException

doExecute

protected java.lang.String doExecute()
                              throws java.lang.Exception
Redirect to URL

Overrides:
doExecute in class ActionSupport
Throws:
java.lang.Exception


Copyright © 2001-2003 WebWork All Rights Reserved.