(转)Struts2 result返回类型(type)小结
|
类型 |
chain |
|
描述 |
用来处理Action链,被跳转的action中仍能获取上个页面的值,如request信息。 |
|
使用的类 |
com.opensymphony.xwork2.ActionChainResult |
|
类型 |
dispatcher |
|
描述 |
用来转向页面,通常处理JSP |
|
使用的类 |
org.apache.struts2.dispatcher.ServletDispatcherResult |
|
类型 |
freemaker |
|
描述 |
处理FreeMarker模板 |
|
使用的类 |
org.apache.struts2.views.freemarker.FreemarkerResult |
|
类型 |
httpheader |
|
描述 |
控制特殊HTTP行为的结果类型 |
|
使用的类 |
org.apache.struts2.dispatcher.HttpHeaderResult |
|
类型 |
stream |
|
描述 |
向浏览器发送InputSream对象,通常用来处理文件下载,还可用于返回AJAX数据 |
|
使用的类 |
org.apache.struts2.dispatcher.StreamResult |
|
类型 |
velocity |
|
描述 |
处理Velocity模板 |
|
使用的类 |
org.apache.struts2.dispatcher.VelocityResult |
|
类型 |
xslt |
|
描述 |
处理XML/XLST模板 |
|
使用的类 |
org.apache.struts2.views.xslt.XSLTResult |
|
类型 |
plainText |
|
描述 |
显示原始文件内容,例如文件源代码 |
|
使用的类 |
org.apache.struts2.dispatcher.PlainTextResult |
|
类型 |
plaintext |
|
描述 |
显示原始文件内容,例如文件源代码 |
|
使用的类 |
org.apache.struts3.dispatcher.PlainTextResult |
|
类型 |
redirect |
|
描述 |
重定向到一个URL ,被跳转的页面中丢失传递的信息,如request |
|
使用的类 |
org.apache.struts2.dispatcher.ServletRedirectResult |
|
类型 |
redirectAction |
|
描述 |
重定向到一个Action ,跳转的页面中丢失传递的信息,如request |
|
使用的类 |
org.apache.struts2.dispatcher.ServletActionRedirectResult |
|
类型 |
redirect-action |
|
描述 |
重定向到一个Action ,跳转的页面中丢失传递的信息,如request |
|
使用的类 |
org.apache.struts2.dispatcher.ServletActionRedirectResult |

浙公网安备 33010602011771号