Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.struts.config.ForwardConfig
public class ForwardConfig
extends java.lang.Object
implements Serializable
<forward>
element from a Struts
configuration file.
Field Summary | |
protected boolean |
|
protected boolean |
|
protected String |
|
protected String |
|
protected String |
|
protected boolean |
|
Constructor Summary | |
| |
| |
| |
|
Method Summary | |
void |
|
boolean |
|
String | |
String |
|
String |
|
boolean | |
void |
|
void |
|
void |
|
void |
|
void |
|
String |
|
protected boolean configured
Has this component been completely configured?
protected boolean contextRelative
Deprecated. Use module property instead; will be removed in a release following 1.2.0.
Should the value of thepath
property be considered context-relative if it starts with a slash (and therefore not prefixed with the module prefix?
protected String module
The prefix of the module to which thisForwardConfig
entry points, which must start with a slash ("/") character. Usage note: If a forward config is used in a hyperlink, and a module is specified, the path must lead to another action and not directly to a page. This is in keeping with rule that in a modular application all links must be to an action rather than a page.
protected String name
The unique identifier of this forward, which is used to reference it inAction
classes.
protected String path
The URL to which thisForwardConfig
entry points, which must start with a slash ("/") character. It is interpreted according to the following rules:
- If
contextRelative
property istrue
, 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 theforwardPattern
property defined on theControllerConfig
element for our current module. For the defaultforwardPattern
value of$C$M$P
, the resulting server-relative URL will be the concatenation of the context path, the module prefix, and thepath
from thisForwardConfig
.
protected boolean redirect
Should a redirect be used to transfer control to the specified path?
public ForwardConfig()
Construct a new instance with default values.
public ForwardConfig(String name, String path, boolean redirect)
Construct a new instance with the specified values.
- Parameters:
name
- Name of this forwardpath
- Path to which control should be forwarded or redirectedredirect
- Should we do a redirect?
public ForwardConfig(String name, String path, boolean redirect, String module)
Construct a new instance with the specified values.
- Parameters:
name
- Name of this forwardpath
- Path to which control should be forwarded or redirectedredirect
- Should we do a redirect?module
- Module prefix, if any
public ForwardConfig(String name, String path, boolean redirect, boolean contextRelative)
Deprecated. Use module rather than contextRelative
Construct a new instance with the specified values.
- Parameters:
name
- Name of this forwardpath
- Path to which control should be forwarded or redirectedredirect
- Should we do a redirect?contextRelative
- Is this path context relative?
public void freeze()
Freeze the configuration of this component.
public boolean getContextRelative()
Deprecated. Use module property instead; will be removed in a release following 1.2.0.
public String getModule()
public String getName()
public String getPath()
public boolean getRedirect()
public void setContextRelative(boolean contextRelative)
Deprecated. Use module property instead; will be removed in a release following 1.2.0.
public void setModule(String module)
public void setName(String name)
public void setPath(String path)
public void setRedirect(boolean redirect)
public String toString()
Return a String representation of this object.