在liferay strut2中如何使用session

1 后台代码

ActionContext actionContext = ActionContext.getContext();
	        Map session = actionContext.getSession();
	        session.put("userid", "19934");

2 jsp取值

  String userid = (String)ActionContext.getContext().getSession().get("userid");

<s:property value="#session.userid"/>


你可能感兴趣的:(在liferay strut2中如何使用session)