|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.struts.config.ForwardConfig
A JavaBean representing the configuration information of a
<forward>
element from a Struts
configuration file.
Field Summary | |
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. |
protected java.lang.String |
module
The prefix of the module to which this ForwardConfig entry points,
which must start with a slash ("/") character. |
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)
Deprecated. Use module rather than contextRelative |
|
ForwardConfig(java.lang.String name,
java.lang.String path,
boolean redirect,
java.lang.String module)
Construct a new instance with the specified values. |
Method Summary | |
void |
freeze()
Freeze the configuration of this component. |
boolean |
getContextRelative()
Deprecated. Use module property instead; will be removed in a release following 1.2.0. |
java.lang.String |
getModule()
|
java.lang.String |
getName()
|
java.lang.String |
getPath()
|
boolean |
getRedirect()
|
void |
setContextRelative(boolean contextRelative)
Deprecated. Use module property instead; will be removed in a release following 1.2.0. |
void |
setModule(java.lang.String module)
|
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 |
|
Field Detail |
protected boolean configured
protected boolean contextRelative
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
Action
classes.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:
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.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
.protected java.lang.String module
The prefix of the module to which this ForwardConfig
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 boolean redirect
Constructor Detail |
public ForwardConfig()
public ForwardConfig(java.lang.String name, java.lang.String path, boolean redirect)
name
- Name of this forwardpath
- Path to which control should be forwarded or redirectedredirect
- Should we do a redirect?public ForwardConfig(java.lang.String name, java.lang.String path, boolean redirect, boolean contextRelative)
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 ForwardConfig(java.lang.String name, java.lang.String path, boolean redirect, java.lang.String module)
Construct a new instance with the specified values.
name
- Name of this forwardpath
- Path to which control should be forwarded or redirectedredirect
- Should we do a redirect?module
- Module prefix, if anyMethod Detail |
public boolean getContextRelative()
public void setContextRelative(boolean contextRelative)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getPath()
public void setPath(java.lang.String path)
public java.lang.String getModule()
public void setModule(java.lang.String module)
public boolean getRedirect()
public void setRedirect(boolean redirect)
public void freeze()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |