struts1 forward 请求带参数

如果action配置中,加了scope="request"属性,则在业务处理完成转发到新请求时,通过request.setAttribute("id",1);这种直接传参到新请求不成功,有两种方法解决
1.直接在action中 return new ActionForward("a.do?id=1");

2.return new ActionForward(mapping.findForward("SUCESS").getPath() + "?id=1");

你可能感兴趣的:(action,mapping,scope,findforward,sucess)