struts 2 BaseAction

package com.alpha.util; import java.util.Map; /* * Info: 封装Struts2 对 reques、response、session的获取,子类直接继承此类即可 * Date: 2010-5-10 15:27:17 * Auth:YDF */ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.dispatcher.SessionMap; import org.apache.struts2.interceptor.ServletRequestAware; import org.apache.struts2.interceptor.ServletResponseAware; import org.apache.struts2.interceptor.SessionAware; import com.opensymphony.xwork2.ActionSupport; public class BaseAction extends ActionSupport implements SessionAware, ServletRequestAware, ServletResponseAware { private static final long serialVersionUID = 1L; public HttpServletRequest request; public HttpServletResponse response; @SuppressWarnings("unchecked") public Map session; public void setSession(Map<string object=""> session) { this.session = session; } public void setServletRequest(HttpServletRequest request) { this.request = request; } public void setServletResponse(HttpServletResponse response) { this.response = response; } }</string>

你可能感兴趣的:(Date,struts,session,Class,2010)