A base class for all Struts action execution results. The "location" param is the default parameter, meaning the most common usage of this result would be:
This class provides two common parameters for any subclass:
- location - the location to go to after execution (could be a jsp page or another action). It can be parsed as per the rules definied in the
translateVariables
method - parse - true by default. If set to false, the location param will not be parsed for expressions
- encode - false by default. If set to false, the location param will not be url encoded. This only have effect when parse is true
NOTE: The encode param will only have effect when parse is true
In the struts.xml configuration file, these would be included as:
<result name="success" type="redirect"> <param name="location">foo.jsp</param> </result>
or
<result name="success" type="redirect" > <param name="location">foo.jsp?url=${myUrl}</param> <param name="parse">true</param> <param name="encode">true</param> </result>
In the above case, myUrl will be parsed against Ognl Value Stack and then URL encoded.
or when using the default parameter feature
<result name="success" type="redirect">foo.jsp</result>
You should subclass this class if you're interested in adding more parameters or functionality to your Result. If you do subclass this class you will need to override doExecute(String, ActionInvocation)
.
Any custom result can be defined in struts.xml as:
<result-types> ... <result-type name="myresult" class="com.foo.MyResult" /> </result-types>
Please see the Result
class for more info on Results in general.
相关推荐
实际上,Struts2没有名为`StrutsResultSupport`的类。通常来说,可以通过扩展现有的处理结果类型或创建新的处理结果类型来实现自定义处理结果。 7. **默认处理结果类型** - 默认的处理结果类型是`dispatcher`:...
day49_Tax3_jQuery.ajax_Exception_StrutsResultSupport day50_Tax4 day51_UML&SVN; day52_Tax5_EDrawmax_PowerDesigner_ueditor day53_Tax6_QueryHelper_Echo_PageResult day54_Tax7_Complain day55_Tax8_...
5. **StrutsResultSupport**: 作为所有结果类型的基类,提供了结果处理的基本方法。 6. **Interceptor栈配置**: 在`struts-default.xml`或自定义配置文件中定义的拦截器栈,决定了请求处理的流程。 通过深入研究`...
它通过扩展StrutsResultSupport类来实现文件的下载。以下是StreamResult类的三个重要属性: - **contentType**:指定下载文件的MIME类型,这决定了浏览器如何处理文件下载。 - **contentDisposition**:用于指定...
python学习资源
jfinal-undertow 用于开发、部署由 jfinal 开发的 web 项目
基于Andorid的音乐播放器项目设计(国外开源)实现源码,主要针对计算机相关专业的正在做毕设的学生和需要项目实战练习的学习者,也可作为课程设计、期末大作业。
python学习资源
python学习资源
python学习一些项目和资源
【毕业设计】java-springboot+vue家具销售平台实现源码(完整前后端+mysql+说明文档+LunW).zip
HTML+CSS+JavaScarip开发的前端网页源代码
python学习资源
【毕业设计】java-springboot-vue健身房信息管理系统源码(完整前后端+mysql+说明文档+LunW).zip
成绩管理系统C/Go。大学生期末小作业,指针实现,C语言版本(ANSI C)和Go语言版本
1_基于大数据的智能菜品个性化推荐与点餐系统的设计与实现.docx
【毕业设计】java-springboot-vue交流互动平台实现源码(完整前后端+mysql+说明文档+LunW).zip
内容概要:本文主要探讨了在高并发情况下如何设计并优化火车票秒杀系统,确保系统的高性能与稳定性。通过对比分析三种库存管理模式(下单减库存、支付减库存、预扣库存),强调了预扣库存结合本地缓存及远程Redis统一库存的优势,同时介绍了如何利用Nginx的加权轮询策略、MQ消息队列异步处理等方式降低系统压力,保障交易完整性和数据一致性,防止超卖现象。 适用人群:具有一定互联网应用开发经验的研发人员和技术管理人员。 使用场景及目标:适用于电商、票务等行业需要处理大量瞬时并发请求的业务场景。其目标在于通过合理的架构规划,实现在高峰期保持平台的稳定运行,保证用户体验的同时最大化销售额。 其他说明:文中提及的技术细节如Epoll I/O多路复用模型以及分布式系统中的容错措施等内容,对于深入理解大规模并发系统的构建有着重要指导意义。
基于 OpenCV 和 PyTorch 的深度车牌识别
【毕业设计-java】springboot-vue教学资料管理系统实现源码(完整前后端+mysql+说明文档+LunW).zip