2018.12.16 struts.xml 结果集方式分析 && 源码查看
2024-10-20 16:19:24
1.结果集
转发
重定向
转发Action
重定向Action
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<!-- 是否开启开发模式
struts.enable.DynamicMethodInvocation = false
-->
<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant>
<package name="result" namespace="/" extends="struts-default">
<!-- 转发 -->
<action name="Demo1Action" class="com.legend.action.Demo1Action" method="execute">
<result name="success" type="dispatcher">/hello.jsp</result>
</action>
<!-- 重定向 -->
<action name="Demo2Action" class="com.legend.action.Demo2Action" method="execute">
<result name="success" type="redirect">/hello.jsp</result>
</action>
<!-- 转发到action -->
<action name="Demo3Action" class="com.legend.action.Demo3Action" method="execute">
<result type="chain">
<!-- action的名字 -->
<param name="actionName">Demo1Action</param>
<!-- action所在的命名空间 -->
<param name="namespace">/</param>
</result>
</action>
<!-- 转发到action -->
<action name="Demo4Action" class="com.legend.action.Demo4Action" method="execute">
<result type="redirectAction">
<!-- action的名字 -->
<param name="actionName">Demo1Action</param>
<!-- action所在的命名空间 -->
<param name="namespace">/</param>
</result>
</action>
</package>
<!-- 引入xml文件 -->
<include file="com/legend/b_api/struts.xml"></include>
<include file="com/legend/c_param/struts.xml"></include>
</struts>
最新文章
- active_record的不定时更新
- Immutable笔记
- ios选取相册视频,过滤掉所有图片!
- 挂载NFS
- Rails :.nil? , .empty?, .blank? .present? 的区别
- the bundle at bundle path is not signed using an apple submission certificate
- Android-动画简介
- windows2008安装IIS
- 单据类型BE构建
- p235习题1
- 关于PushKit的使用总结
- centos7 修改selinux 开机导致 faild to load SELinux policy freezing 错误
- 读懂IL代码(二)
- (转载)PHP array_merge() 函数
- Spring3.0学习笔记文档的官方网站(六)--3.4.1
- SVG基础以及使用Javascript DOM操作SVG
- java-生成任意格式的json数据
- eclipse修改默认workspace
- api-gateway实践(02)新服务网关 - 运行环境
- mybatis进阶--输入映射和输出映射