自定义Jsp内置对象Session、Request等

package com.tarena.dang.action.user;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;

public class BaseAction implements 
	SessionAware,ServletRequestAware{
	protected Map<String, Object> session;
	protected HttpServletRequest httpRequest;
	
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	public void setServletRequest(HttpServletRequest httpRequest) {
		this.httpRequest = httpRequest;
	}

}

你可能感兴趣的:(自定义Session)