struts2 action result type类型

1.chain:用来处理Action链,被跳转的action中仍能获取上个页面的值,如request信息。

com.opensymphony.xwork2.ActionChainResult

2.dispatcher:用来转向页面,通常处理JSP

org.apache.struts2.dispatcher.ServletDispatcherResult

3.freemaker:处理FreeMarker模板

org.apache.struts2.views.freemarker.FreemarkerResult

4.httpheader:控制特殊HTTP行为的结果类型

org.apache.struts2.dispatcher.HttpHeaderResult

5.stream:向浏览器发送InputSream对象,用来处理文件下载,还可用于返回AJAX数据

org.apache.struts2.dispatcher.StreamResult

6.velocity :处理Velocity模板

org.apache.struts2.dispatcher.VelocityResult

7.xsl:

处理XML/XLST模板

org.apache.struts2.views.xslt.XSLTResult

8.plaintext:显示原始文件内容,例如文件源代码

org.apache.struts2.dispatcher.PlainTextResult

9.redirect:重定向到一个URL ,被跳转的页面中丢失传递的信息,如request

org.apache.struts2.dispatcher.ServletRedirectResult

10.redirectAction :重定向到一个Action ,跳转的页面中丢失传递的信息,如request

org.apache.struts2.dispatcher.ServletActionRedirectResult

11.redirect-action:重定向到一个Action ,跳转的页面中丢失传递的信息,如request

org.apache.struts2.dispatcher.ServletActionRedirectResult

struts2 action result type类型的更多相关文章

  1. Struts2 中result type属性说明

    Struts2 中result type属性说明 首先看一下在struts-default.xml中对于result-type的定义: <result-types><result-t ...

  2. struts2 result type类型

    result标签中type的类型 类型 说明 chain 用于Action链式处理 dispatcher 用于整合JSP,是<result>元素默认的类型 freemarket 用来整合F ...

  3. Struts2 语法--result type

    result type: dispatcher,redirect:只能跳转到jsp,html之类的页面,dispatcher属于服务器跳转, redirect属于客户端跳转 chain: 等同于for ...

  4. struts2 中 result type="stream"

    Stream result type是Struts2中比较有用的一个feature.特别是在动态生成图片和文档下载的情况下 1:图片验证码: Action类,action主要要提供一个获取InputS ...

  5. Struts2笔记——result结果类型

    result > 每个 action方法都将返回一个 String 类型的值,Struts 将根据这个值来决定响应什么结果. > 每个 Action声明都必须包含有数量足够多的 resul ...

  6. Struts2 中 result type=”json” 的参数解释

    转自:http://wangquanhpu.iteye.com/blog/1461750 1, ignoreHierarchy 参数:表示是否忽略等级,也就是继承关系,比如:TestAction 继承 ...

  7. struts2的result的类型配置简介

    一.在strut2的action处理完成后,就应该向用户返回结果信息result 根据以下代码作为实例分析: <package name="Hello" extends=&q ...

  8. jquery序列化from表单使用ajax提交返回json数据(使用struts2注解result type = json)

    1.action类引入struts2的"json-default"拦截器栈 @ParentPackage("json-default") //示例 @Paren ...

  9. struts2文件下载 <result type="stream">

    <!--struts.xml配置--> <action name="download" class="com.unmi.action.DownloadA ...

随机推荐

  1. scrapy多线程文件下载

    在爬取数据时有时候有些文件数据需要爬取下载下来使用多线程下载可以让程序跑的更快点. scrapy中有个扩展可以使用扩展模块来实现下载. 在自己的spider中加入 custom_settings cl ...

  2. 扩展ScriptBundle,支持混淆加密javascript

    一.需求: 在web开发中,经常会处理javascript的一些问题,其中就包括js的压缩,合并,发布版本以及混淆加密等等问题.在asp.net 开发中我们使用ScriptBundle已经可以解决ja ...

  3. FastAdmin 的前端环境怎么安装?

    FastAdmin 的前端环境怎么安装? 安装 Git 安装 Node.js 安装 cnpm 安装 bower 开始安装 FastAdmin 的前端组件 bower install bower upd ...

  4. 工欲善其事必先利其器系列之:更换Visual Studio主题.

    前言:如果你厌烦的vs2010的蓝色风格主题,可以使用Visual Studio Color Theme Editor这款插件来改变主题风格,不过我还是喜欢METRO风格. 效果图预览: Windwo ...

  5. 转 shell 命令 http://www.cnblogs.com/me115/p/3427319.html

    http://www.cnblogs.com/me115/p/3427319.html 本文将介绍Linux下使用Shell处理文本时最常用的工具:find.grep.xargs.sort.uniq. ...

  6. pytest框架 里 fixture 参数化的方法

  7. mysql connection phase(未整理)

    14.2.1 初始握手初始握手从服务器发送 Initial_Handshake_Packet开始.在这之后,客户端可以选择是否通过SSL_Connection_Request_Packet发送SSL连 ...

  8. CFGym 100198G 题解

    一.题目链接 http://codeforces.com/gym/100198/problem/G 二.题意 看样例就能明白,写表达式解析器. 三 .思路 一看这题目,立马就会想到“后缀表达式”,考虑 ...

  9. JQuery input file 上传图片

    表单元素file设置隐藏,通过其他元素打开: .imgfile为input file $(".ul").click(function () {return $(".img ...

  10. Tomcat中部署网站和绑定域名

    在安装的tomcat的文件夹下有个conf文件夹 下面有个server.xml文件, 1. 使用80端口 默认tomcat用的是8080端口. <Connector port="808 ...