Action类的execute()方法返回一个ActionForward对象。ActionForward对象代表了Web资源的逻辑对象,这里的Web资源可以是JSP页面、JavaServlet或Action。
下面是ActionForward类的源代码:
package org.apache.struts.action;
import org.apache.struts.config.ForwardConfig;
public class ActionForward extends ForwardConfig {
/**
* <p>Construct a new instance with default values.</p>
*/
public ActionForward() {
this(null, false);
}
/**
* <p>Construct a new instance with the specified path.</p>
*
* @param path Path for this instance
*/
public ActionForward(String path) {
this(path, false);
}
/**
* <p>Construct a new instance with the specified <code>path</code> and
* <code>redirect</code> flag.</p>
*
* @param path Path for this instance
* @param redirect Redirect flag for this instance
*/
public ActionForward(String path, boolean redirect) {
super();
setName(null);
setPath(path);
setRedirect(redirect);
}
/**
* <p>Construct a new instance with the specified <code>name</code>,
* <code>path</code> and <code>redirect</code> flag.</p>
*
* @param name Name of this instance
* @param path Path for this instance
* @param redirect Redirect flag for this instance
*/
public ActionForward(String name, String path, boolean redirect) {
super();
setName(name);
setPath(path);
setRedirect(redirect);
}
/**
* <p>Construct a new instance with the specified values.</p>
*
* @param name Name of this forward
* @param path Path to which control should be forwarded or
* redirected
* @param redirect Should we do a redirect?
* @param module Module prefix, if any
*/
public ActionForward(String name, String path, boolean redirect,
String module) {
super();
setName(name);
setPath(path);
setRedirect(redirect);
setModule(module);
}
/**
* <p>Construct a new instance based on the values of another
* ActionForward.</p>
*
* @param copyMe An ActionForward instance to copy
* @since Struts 1.2.1
*/
public ActionForward(ActionForward copyMe) {
this(copyMe.getName(), copyMe.getPath(), copyMe.getRedirect(),
copyMe.getModule());
}
}
分享到:
相关推荐
struts-1.3.10 源代码struts-1.3.10 源代码struts-1.3.10 源代码struts-1.3.10 源代码struts-1.3.10 源代码struts-1.3.10 源代码
很多人都会使用struts,但是有时要更深入了解其中原理,还得看代码。
struts1.3.10 和 struts2.0.14 包
struts1.3.10全部jar struts1.x 最新版jar
深圳电信培训中心.徐海蛟老师上ssha课时候用的中文版struts api chm中文文档。 支持高级搜索,即时搜索。吐血奉送各位。
Struts 1.3.10+Spring3.0.5+Mybatis3.1.1框架整合的所有jar包都有,挺详细的
中文版struts api chm中文文档。 支持高级搜索,即时搜索
Struts1 hibernate spring 框架整合 三大框架的整合,具体的实现,
struts1.3.10.zip
Struts 1.3.10 用户指南.中文版 官方参考文档
struts1jar包,包含所有的jar包。共有20个,下载解压后即可。
struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码 struts-1.3.10源码
包含Struts1.3.10 的工具包,源代码,doc文档和app。
struts1.x框架的资源文件里面包含了jar包,api源码以及一些如何使用框架的一些实例
本人自己根据“精通struts”上的例子写的一个helloworld例子,已经调试通过,希望对大家有帮助。jdk1.6+Tomcat6.0+eclipse3.5+struts1.3.10
个人整理的Struts 1.3.10框架的API,按Java6 API的风格整理
struts-1.3.10的所有架包jar文件