1 参数接收

2 配置文件中

1 Demo2Action

package www.test.c_config;

import com.opensymphony.xwork2.ActionSupport;

public class Demo2Action extends ActionSupport {

    private String name;
public String execute() throws Exception {
name="lucy";//从数据库中查询到的
return SUCCESS;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
} }

2 struts.xml

<action name="Demo2Action" class="www.test.c_config.Demo2Action"
method="execute">
<result name="success" type="redirectAction">
<!--action的名字 -->
<param name="actionName">Demo1Action</param>
<!--访问action的命名空间 -->
<param name="namespace">/</param> <!-- 如果添加的参数struts"看不懂".就会作为参数附加重定向的路径之后.
如果参数是动态的.可以使用${}包裹ognl表达式.动态取值 --> <param name="name">${name}</param>
</result>
</action>

最新文章

  1. sqlalchemy多表联合查询(join)
  2. 205 Isomorphic Strings
  3. ittype导师课程 - SAP顾问课程,云课堂,个性辅导
  4. C#多线程与UI响应 跨线程更新UI
  5. *[topcoder]TheTree
  6. uva 11922 - Permutation Transformer
  7. TreeView绑定无限层级关系类
  8. (三目运算符)PHP中问号?和冒号: 的作用
  9. MSSQl 事务的使用
  10. zoj 3950 how many nines
  11. c语言的第四次作业
  12. Python虚拟环境笔记
  13. zookeeper的监控
  14. luogu P2303 [SDOi2012]Longge的问题
  15. [原创]H5前端性能测试工具介绍
  16. hive中创建子表并插入数据过程初始化MR报错解决方法
  17. 3. sklearn的K-Means的使用
  18. 006-jdk1.5版本新特性
  19. mkdirp——递归创建目录及其子目录
  20. JavaScript字符串数组拼接的性能测试及优化方法

热门文章

  1. Extjs Hello extjs
  2. SQL cast 函数
  3. java學習書
  4. 「HNOI2013」切糕
  5. openfiler的介绍与使用
  6. SpringBoot+MyBatis+MySQL读写分离(实例)
  7. tcp连接过程中的三次握手和四次挥手
  8. [原创]用WinRAR实现VC源代码快速压缩创建
  9. apache2.4配置
  10. [转]Why you shouldn&#39;t use set (and what you should use instead)