[Struts2]配置之Result/include多配置struts.xml文件/Action
来源:互联网 发布:jquery.jsonp.js下载 编辑:程序博客网 时间:2024/05/29 17:16
》》result告诉项目调用完Action后下一步该做什么,一般作为<action>的子元素
<result name=".." type=" ...">/index.jsp</result>
》全局result:如果其他Action不匹配,就会调用
<global-results><result name="global">/login.jsp</result></global-results>》字段type
dispatcher :默认,用来转向jsp页面
chain:用来处理Action链,方便同名数据变量的共享
<action name="demo" class="com.yiki.demo.DomeAction"><result name="succese" type="chain">demo2</result></action><action name="demo2" class="com.yiki.demo.DomeAction2"><result name="succese">/index.jsp</result></action>注意测试的传值方式为,aa是namespace=/aa
http://localhost:8080/struts-test/aa/demo?username=Tiffany
freemaker:
httpheader:
redirect:
redirectAction:
stream:
》》多配置文件
运行存在多个struts.xml文件,以struts1.xml,struts2xml,struts3.xml...
在总配置文件里引用
<include file="struts.1xml"></include><include file="struts.2xml"></include>
》》Action
可以在method里指定这个类里的方法
<action name="login" class="com.yiki.demo.LoginAction" method="add"><result name="succese">/index.jsp</result><result name="login">/login.jsp</result></action>
阅读全文
0 0
- [Struts2]配置之Result/include多配置struts.xml文件/Action
- Struts2-struts.xml之<result>配置错误
- struts2的配置之could not find action or result 问题的解决方法(struts.xml文件路径)
- Struts2 在Struts.xml配置Action的result
- struts2 action result配置
- Struts2框架中struts.xml文件的package标签的命名空间属性、默认action配置、result配置、Struts异常处理
- Struts2 文件下载Action及Struts.xml配置
- Struts2之两个Action传值和不传值的struts.xml文件配置
- Struts2之两个Action传值和不传值的struts.xml文件配置
- Struts2之两个Action传值和不传值的struts.xml文件配置
- Struts2之两个Action传值和不传值的struts.xml文件配置
- Struts2 在struts.xml配置Action
- Struts2 Action与超链接 struts.xml配置
- Struts2-action在struts.xml中的配置
- Struts2的配置 struts.xml Action详解
- 深入详解Struts2——struts.xml配置之Result配置详解
- Struts2配置struts.xml文件
- 不用配置Action和Result的struts.xml配置文件
- Tomcat 实现会话保持
- Bellman_ford 边表示
- Javase—分支语句习题
- 信息验证的js文件
- win10 bash下搭建机器学习环境
- [Struts2]配置之Result/include多配置struts.xml文件/Action
- Maven test多线程陷阱
- Xshell远程连接ubuntu服务器 拒绝连接
- VMware下网络配置三种模式对比(桥接模式|主机模式|网络地址转换)
- 转载荟萃
- CSS属性值之百分数
- JavaCore-OOP-3-图书管理系统(完善版)
- volatile关键字
- Node.js EJS模板引擎