java代码:
PersoninfoAction.java
public ActionForward savePersonInfoCoster(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
PersonInfoForm personInfoForm = (PersonInfoForm) form;
return mapping.findForward("userList");
}
从personinfo.do 的方法跳到user
<action attribute="personInfoForm" name="personInfoForm" parameter="method" path="/personInfo" scope="request" type="org.springframework.web.struts.DelegatingActionProxy" validate="false">
<forward name="userList" path="/user.do?method=showUserList" redirect="true" />
</action>
一开始forward 不加 redirect="true"的时候会报:
DispatchActio E org.apache.struts.actions.DispatchAction Request[/messageAction] does not contain handler parameter named 'method'. This may be caused by whitespace in the label text.