| 名字 | 说明 |
|---|---|
| Chain Result | 用来处理Action链 |
| Dispatcher Result | 用来转向页面,通常处理JSP |
| FreeMarker Result | 处理FreeMarker模板 |
| HttpHeader Result | 用来控制特殊的Http行为 |
| Redirect Result | 重定向到一个URL |
| Redirect Action Result | 重定向到一个Action |
| Stream Result | 向浏览器发送InputSream对象,通常用来处理文件下载 |
| Velocity Result | 处理Velocity模板 |
| XLS Result | 处理XML/XLST模板 |
| PlainText Result | 显示原始文件内容,例如文件源代码 |
| S2PLUGINS:Tiles Result | 结合Tile使用 |
<result-types> <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" /> <!-- Deprecated name form scheduled for removal in Struts 2.1.0. The camelCase versions are preferred. See ww-1707 --> <result-type name="redirect-action" class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/> <result-type name="plaintext" class="org.apache.struts2.dispatcher.PlainTextResult" /> </result-types>
<result name="success" type="dispatcher"> <param name="location">/ThankYou.jsp</param> </result>
<result> <param name="location">/ThankYou.jsp</param> </result>
<result>/ThankYou.jsp</result>
<action name="Hello"> <result>/hello/Result.jsp</result> <result name="error">/hello/Error.jsp</result> <result name="input">/hello/Input.jsp</result> </action>
<global-results> <result name="error">/Error.jsp</result> <result name="invalid.token">/Error.jsp</result> <result name="login" type="redirect-action">Logon!input</result> </global-results>
private String nextAction;
public String getNextAction() {
return nextAction;
}
<action name="fragment" class="FragmentAction">
<result name="next" type="redirect-action">${nextAction}</result>
</action>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有