81,094
社区成员
发帖
与我相关
我的任务
分享
public class BaseAction extends ActionSupport implements SessionAware{
public static final String LOGIN = "login";
private Map<String, Object> mapSession;
public Map<String, Object> getSession() {
return mapSession;
}
public void setSession(Map<String, Object> arg0) {
this.mapSession = arg0;
}
public HttpServletRequest getRequest(){
return ServletActionContext.getRequest();
}
public HttpServletResponse getResponse(){
return ServletActionContext.getResponse();
}
public String getText(String key) {
getSession();
String value = super.getText(key);
if(value != null )
return value;
return key;
}
}