Struts2-ResultType-4-带参数的结果集
来源:互联网 发布:苹果数据传输软件 编辑:程序博客网 时间:2024/05/21 19:34
场景:在请求的URL中传参,之后参数显示在jsp中
如果result的type是forward类型(type=dispatcher/chain),则共享值栈(因为相当于只有一次request请求),不需要在xml中取参数值
xml中
<action name="r1" > <result>/resultParam.jsp</result> </action> <action name="r2" class="com.resultParam.ResultParamAction"> <result type="chain">r1</result> </action>
jsp中
from value stack<s:property value="type"></s:property>
如果result的type是redirect类型(type=”redirect”,redirectAction),则不共享值栈,需要在xml中取值后,在JSP中用OGNL表达式取值(ValueStack,StackContext)
xml中
<action name="r3" class="com.resultParam.ResultParamAction"> <result type="redirect">/resultParam.jsp?type=${type}</result> </action> <action name="r4" class="com.resultParam.ResultParamAction"> <result type="redirectAction">r1?type=${type}</result> </action>
jsp中
from stack context<s:property value="#parameters.type"></s:property>
访问图:
0 0
- Struts2-ResultType-4-带参数的结果集
- struts2 带参数的结果集
- Struts2中带参数的结果集
- struts2带参数的结果集
- Struts2 带参数的结果集
- Struts2 带参数的结果集
- Struts2学习——1200带参数的结果集
- Struts2的全局结果集Global_Results、动态结果集dynamic_result、带参数的结果集
- 全局结果集,带参数的结果集和动态结果集(struts2)
- struts2 动态结果及以及带参数的结果集(redirect页面跳转时候使用)
- struts2学习(7)struts2中的带参数的结果集
- struts2 07 结果类型 ResultType
- Struts2-ResultType-1-结果类型
- Struts2-ResultType-2-全局结果集(Global_Results)
- Struts2-ResultType-3-动态结果集(dynamic_Results)
- struts2的resultType
- struts2的resultType类型
- struts2_10_带参数的结果集
- 【背包问题】目录
- RHEL7--UNIT15-虚拟机管理
- 微擎前端页面写PHP代码
- mysql安装及主从复制
- 数据库的查找和更新
- Struts2-ResultType-4-带参数的结果集
- c++计算(带符号的)
- "Implicit declaration of function 'sysctl' is invalid in C99” 报错问题
- nodejs mysql 执行多条sql语句
- Canvas清空当前画布方法
- 跟随鼠标移动div
- 【转】解决Android因加载多个大图引起的OutOfMemoryError,内存溢出的问题
- 数据库的查询与统计
- DevExpress 帮助文档exe文件及Microsoft Help文档查看器下载