- 论坛徽章:
- 0
|
我在看一个structs-config.xml的时候,看到了一个配置:
<action path="/run/report/editReportDefinitions"
type="XXX.XXX.PrepareReportDefinitionAction"
name="reportDefinitionForm"
>
<forward name="editReportDef" path="/run/report/editReportDefinitions" />
</action>
然后在PrepareReportDefinitionAction.java中的逻辑也很奇怪:
doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
long id = getParaAsLong(request, RequestPara.ALL_ID, PersistentObject.NULL_ID);
if (id == PersistentObject.NULL_ID) {
///////
//最后的return逻辑如下:
return mapping.findForward("editReportDef");
。。。。。。。。。。
}
一段是出错的逻辑,显示错误jsp页面,正常逻辑最后又return到了forward那里,这不是死循环了?通过structs-config.xml的定义,应该又回到了editReportDefinitions
请问大家这是怎么回事呢? 难道有办法从这个唯一的
<forward name="editReportDef" path="/run/report/editReportDefinitions" />
转出来么?这是个常用法或者什么技巧么? |
|