org.apache.struts.action
Class ActionForward

java.lang.Object
  |
  +--org.apache.struts.action.ActionForward
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ForwardingActionForward, RedirectingActionForward

public class ActionForward
extends java.lang.Object
implements java.io.Serializable

An ActionForward represents a destination to which the controller servlet, ActionServlet, might be directed to perform a RequestDispatcher.forward() or HttpServletResponse.sendRedirect() to, as a result of processing activities of an Action class. Instances of this class may be created dynamically as necessary, or configured in association with an ActionMapping instance for named lookup of potentially multiple destinations for a particular mapping instance.

An ActionForward has the following minimal set of properties. Additional properties can be provided as needed by subclassses.

Version:
$Revision: 1.1 $ $Date$
Author:
Craig R. McClanahan
See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          The logical name of this forward.
protected  java.lang.String path
          The context-relative (for a forward) or relative or absolute (for a redirect) URI path to be forwarded to.
protected  boolean redirect
          Should this be a redirect instead of a forward?
 
Constructor Summary
ActionForward()
          Construct a new instance with default values.
ActionForward(java.lang.String path)
          Construct a new instance with the specified path.
ActionForward(java.lang.String path, boolean redirect)
          Construct a new instance with the specified path and redirect flag.
 
Method Summary
 java.lang.String getName()
          Return the name.
 java.lang.String getPath()
          Return the path.
 boolean getRedirect()
          Return the redirect flag.
 void setName(java.lang.String name)
          Set the name.
 void setPath(java.lang.String path)
          Set the path.
 void setRedirect(boolean redirect)
          Set the redirect flag.
 java.lang.String toString()
          Return a String version of this mapping.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The logical name of this forward.

path

protected java.lang.String path
The context-relative (for a forward) or relative or absolute (for a redirect) URI path to be forwarded to.

redirect

protected boolean redirect
Should this be a redirect instead of a forward?
Constructor Detail

ActionForward

public ActionForward()
Construct a new instance with default values.

ActionForward

public ActionForward(java.lang.String path)
Construct a new instance with the specified path.
Parameters:
path - Path for this instance

ActionForward

public ActionForward(java.lang.String path,
                     boolean redirect)
Construct a new instance with the specified path and redirect flag.
Parameters:
path - Path for this instance
redirect - Redirect flag for this instance
Method Detail

getName

public java.lang.String getName()
Return the name.

setName

public void setName(java.lang.String name)
Set the name.
Parameters:
name - The new name

getPath

public java.lang.String getPath()
Return the path.

setPath

public void setPath(java.lang.String path)
Set the path.
Parameters:
path - The new path

getRedirect

public boolean getRedirect()
Return the redirect flag.

setRedirect

public void setRedirect(boolean redirect)
Set the redirect flag.
Parameters:
redirect - The new redirect flag

toString

public java.lang.String toString()
Return a String version of this mapping.
Overrides:
toString in class java.lang.Object


Copyright © 2000-2001 - Apache Software Foundation