public class BaseAction extends ActionSupport{
private static final long serialVersionUID = 1348913248;
public Map<String, Object> getSession(){
return ActionContext.getContext().getSession();
}
public Map<String, Object> getContextMap(){
return ActionContext.getContext().getContextMap();
}
public Map<String, Object> getParamMap(){
return ActionContext.getContext().getParameters();
}
public ActionContext getContext(){
return ActionContext.getContext();
}
public void putInSession(String key, Object value){
this.getSession().put(key, value);
}
public void putInContext(String key, Object value){
this.getContextMap().put(key, value);
}
}
BaseAction常用方法封装
最新推荐文章于 2019-07-03 21:29:45 发布