jsp页面这样跳转 <td align="center"><a
href="userAction!gengxin.action?userId=<s:property value='#user.userId'/>">更新</a>
struts配置
<action name="userAction" class="userAction">
<result name="retirve">/jsp/listUser.jsp</result>
<result name="delete">/jsp/delete.jsp</result>
<result name="gengxin">/jsp/gengxin.jsp</result>
</action>
action层进行接收
public String gengxin(){
String userId=ServletActionContext.getRequest().getParameter("userId");
List<User> userList1 = new ArrayList<User>();
userList1 = userService.users(userId);
return "gengxin";
}
为神魔当跳转时会报错,
