protected 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 .
|
protected 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.
|
Constructor: |
public ForwardConfig() {
super();
}
Construct a new instance with default values. |
public ForwardConfig(String name,
String path,
boolean redirect) {
super();
setName(name);
setPath(path);
setRedirect(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?
|
public ForwardConfig(String name,
String path,
boolean redirect,
boolean contextRelative) {
super();
setName(name);
setPath(path);
setRedirect(redirect);
setContextRelative(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?
|
public ForwardConfig(String name,
String path,
boolean redirect,
String module) {
super();
setName(name);
setPath(path);
setRedirect(redirect);
setModule(module);
}
Parameters:
name - Name of this forward
path - Path to which control should be forwarded or redirected
redirect - Should we do a redirect?
module - Module prefix, if any
|
Method from org.apache.struts.config.ForwardConfig Detail: |
public void freeze() {
configured = true;
}
Freeze the configuration of this component. |
public boolean getContextRelative() {
return (this.contextRelative);
} Deprecated! Use - module property instead; will be removed in a release following 1.2.0.
|
public String getModule() {
return (this.module);
}
|
public String getName() {
return (this.name);
}
|
public String getPath() {
return (this.path);
}
|
public boolean getRedirect() {
return (this.redirect);
}
|
public void setContextRelative(boolean contextRelative) {
if (configured) {
throw new IllegalStateException("Configuration is frozen");
}
this.contextRelative = contextRelative;
} Deprecated! Use - module property instead; will be removed in a release following 1.2.0.
|
public void setModule(String module) {
if (configured) {
throw new IllegalStateException("Configuration is frozen");
}
this.module = module;
}
|
public void setName(String name) {
if (configured) {
throw new IllegalStateException("Configuration is frozen");
}
this.name = name;
}
|
public void setPath(String path) {
if (configured) {
throw new IllegalStateException("Configuration is frozen");
}
this.path = path;
}
|
public void setRedirect(boolean redirect) {
if (configured) {
throw new IllegalStateException("Configuration is frozen");
}
this.redirect = redirect;
}
|
public String toString() {
StringBuffer sb = new StringBuffer("ForwardConfig[");
sb.append("name=");
sb.append(this.name);
sb.append(",path=");
sb.append(this.path);
sb.append(",redirect=");
sb.append(this.redirect);
sb.append(",contextRelative=");
sb.append(this.contextRelative);
sb.append(",module=");
sb.append(this.module);
sb.append("]");
return (sb.toString());
}
Return a String representation of this object. |