- 論壇徽章:
- 0
|
我在看一個(gè)structs-config.xml的時(shí)候,看到了一個(gè)配置:
<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");
。。。。。。。。。。
}
一段是出錯(cuò)的邏輯,顯示錯(cuò)誤jsp頁面,正常邏輯最后又return到了forward那里,這不是死循環(huán)了?通過structs-config.xml的定義,應(yīng)該又回到了editReportDefinitions
請(qǐng)問大家這是怎么回事呢? 難道有辦法從這個(gè)唯一的
<forward name="editReportDef" path="/run/report/editReportDefinitions" />
轉(zhuǎn)出來么?這是個(gè)常用法或者什么技巧么? |
|