org.apache.struts.config
Class ForwardConfig

java.lang.Object
  |
  +--org.apache.struts.config.ForwardConfig
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ActionForward

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

A JavaBean representing the configuration information of a <forward> element from a Struts configuration file.

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

Field Summary
protected  boolean configured
          Has this component been completely configured?
protected  boolean contextRelative
          Should the value of the path property be considered context-relative if it starts with a slash (and therefore not prefixed with the module prefix?
protected  java.lang.String name
          The unique identifier of this forward, which is used to reference it in Action classes.
protected  java.lang.String path
          The URL to which this ForwardConfig entry points, which must start with a slash ("/") character.
protected  boolean redirect
          Should a redirect be used to transfer control to the specified path?
 
Constructor Summary
ForwardConfig()
          Construct a new instance with default values.
ForwardConfig(java.lang.String name, java.lang.String path, boolean redirect)
          Construct a new instance with the specified values.
ForwardConfig(java.lang.String name, java.lang.String path, boolean redirect, boolean contextRelative)
          Construct a new instance with the specified values.
 
Method Summary
 void freeze()
          Freeze the configuration of this component.
 boolean getContextRelative()
           
 java.lang.String getName()
           
 java.lang.String getPath()
           
 boolean getRedirect()
           
 void setContextRelative(boolean contextRelative)
           
 void setName(java.lang.String name)
           
 void setPath(java.lang.String path)
           
 void setRedirect(boolean redirect)
           
 java.lang.String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

configured

protected boolean configured
Has this component been completely configured?


contextRelative

protected boolean contextRelative
Should the value of the path property be considered context-relative if it starts with a slash (and therefore not prefixed with the module prefix?


name

protected java.lang.String name
The unique identifier of this forward, which is used to reference it in Action classes.


path

protected java.lang.String path

The URL to which this ForwardConfig entry points, which must start with a slash ("/") character. It is interpreted according to the following rules:

  • If contextRelative property is true, the path is considered to be context-relative within the current web application (even if we are in a named module). It will be prefixed by the context path to create a server-relative URL.
  • If the contextRelative property is false, the path is considered to be the module-relative portion of the URL. It will be used as the replacement for the $P marker in the forwardPattern property defined on the ControllerConfig element for our current module. For the default forwardPattern value of $C$M$P, the resulting server-relative URL will be the concatenation of the context path, the module prefix, and the path from this ForwardConfig.

  • redirect

    protected boolean redirect
    Should a redirect be used to transfer control to the specified path?

    Constructor Detail

    ForwardConfig

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


    ForwardConfig

    public ForwardConfig(java.lang.String name,
                         java.lang.String path,
                         boolean redirect)
    Construct a new instance with the specified values.

    Parameters:
    name - Name of this forward
    path - Path to which control should be forwarded or redirected
    redirect - Should we do a redirect?

    ForwardConfig

    public ForwardConfig(java.lang.String name,
                         java.lang.String path,
                         boolean redirect,
                         boolean contextRelative)
    Construct a new instance with the specified values.

    Parameters:
    name - Name of this forward
    path - Path to which control should be forwarded or redirected
    redirect - Should we do a redirect?
    contextRelative - Is this path context relative?
    Method Detail

    getContextRelative

    public boolean getContextRelative()

    setContextRelative

    public void setContextRelative(boolean contextRelative)

    getName

    public java.lang.String getName()

    setName

    public void setName(java.lang.String name)

    getPath

    public java.lang.String getPath()

    setPath

    public void setPath(java.lang.String path)

    getRedirect

    public boolean getRedirect()

    setRedirect

    public void setRedirect(boolean redirect)

    freeze

    public void freeze()
    Freeze the configuration of this component.


    toString

    public java.lang.String toString()
    Return a String representation of this object.

    Overrides:
    toString in class java.lang.Object


    Copyright © 2000-2003 - Apache Software Foundation