版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wushuicheng/article/details/4164987
//如果一个action要用到另外一个action中的参数,可以先通过对象关系映射组件中的session功能:
import java.util.Map;
ActionContext actionContext = ActionContext.getContext();
Map session = actionContext.getSession();
session.put("USERID", userId);
session.put("USERPWD", userPWD);
session.put("PURVIEW", purview);
//把参数值存起来,然后在另一个action中通过
ActionContext actionContext = ActionContext.getContext();
Map session = actionContext.getSession();
userId = (String) session.get("USERID");
userPWD = (String) session.get("USERPWD");
purview = (String) session.get("PURVIEW");
来获取。