struts 2 xml 访问类型
来源:互联网 发布:javascript 数组 push 编辑:程序博客网 时间:2024/05/19 16:36
<result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult"/>
<result-type name="dispatcher" class="org.apache.struts2.dispatcher.ServletDispatcherResult" default="true"/>
<result-type name="freemarker" class="org.apache.struts2.views.freemarker.FreemarkerResult"/>
<result-type name="httpheader" class="org.apache.struts2.dispatcher.HttpHeaderResult"/>
<result-type name="redirect" class="org.apache.struts2.dispatcher.ServletRedirectResult"/>
<result-type name="redirectAction" class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/>
<result-type name="stream" class="org.apache.struts2.dispatcher.StreamResult"/>
<result-type name="velocity" class="org.apache.struts2.dispatcher.VelocityResult"/>
<result-type name="xslt" class="org.apache.struts2.views.xslt.XSLTResult"/>
<result-type name="plainText" class="org.apache.struts2.dispatcher.PlainTextResult" />
<result-type name="postback" class="org.apache.struts2.dispatcher.PostbackResult" />
</result-types>
dispatcher
success
extend-default
ActionSupport
这些是默认的类型
今天说说 struts.xml 转发类型
chain action 链表
dispatcher 转发 jsp
freemarker freemarker 模板作为视图
httpheader 特别的http
redirect 跳转其他url
redirectAction 跳转action
stream 放回inputStream 用于下载
velocity velocity 视图模板
xslt xml xslt 整合
plainText 显示源码
eg: <action name="pp" class="com.qh.action.LoginAction">
<result type="plainText">/success.jsp</result>
</action>
对于有中文一定要声明charSet
eg:
<action name="pp" class="com.qh.action.LoginAction">
<result type="plainText">
<param name="location">/success.jsp</param>
<param name="charSet">UTF-8</param>
</result>
</action>
- struts 2 xml 访问类型
- Struts 2的struts.xml中配置json类型
- [Struts 2] 配置文件struts.xml的URL访问控制,及struts解析action方式
- struts.xml的result类型
- Struts 2的struts.xml中Return json类型配置详解
- 6.Struts类型转化器:web.xml
- struts.xml中的结果类型与视图
- 7.Struts类型转化器:struts-config.xml
- Struts 2 类型转化
- Struts 2 类型转换器
- Struts 2类型转换
- Struts 2 struts.xml详解(一)
- Struts 2 struts.xml详解(二)
- Struts 2 struts.xml详解(三)
- Struts 2 配置struts.xml骨架
- Struts 2 例子的访问
- struts 2访问web元素
- Struts 2访问Servlet API
- 1026. 程序运行时间(15)
- 什么是cookie-曲奇
- 带参数的方法
- PHP 中的$_SERVER变量学习
- mysql5.7主从复制---基于日志的复制
- struts 2 xml 访问类型
- 字符设备驱动学习之LED
- Git相关教程及团队开发Git分支管理策略
- 字符集与字符编码
- Referenced file contains errors (http://www.springframework.org/schema...
- 用OpenCv转换原始图像数据到wximage
- tp5全选 反选
- Vue学习
- cd 进入目录并显示该目录下文件各需要什么权限 ?