2012-05-27 33 views
12

我正在使用Struts 1.3的一個小項目,我遇到了以下問題。Struts 1.3行動轉發參數

Action發生某些業務邏輯之後,我想將控件轉發到映射在struts-config.xml中的另一個操作。

通常這是我解決這個方式:

struts-config.xml中

<action path="/boardCreate" type="com.example.BoardCreateAction" name="BoardCreateForm" input="/board.jsp"> 
    <forward name="success" path="/board.do" redirect="true" /> 
</action> 

的Java動作類

return mapping.findForward("success"); 

這將需要進行重定向到board.do行動,這也是映射在那裏。

我的問題是,我想控制重定向到這樣的:

<forward name="success" path="/board.do?id=1" redirect="true" /> 

通知的ID = 1個參數。這是否有其他方式,除了重建我自己的行動呢?我找不到任何關於此事的文件。謝謝!

回答