jsp servlet Action获取request,respone,session等

Servlet Jsp Struts2  
HttpServletRequest request内置对象<jsp:request>

ServletActionContext.getRequest()

实现ServletRequestAware接口

 

HttpServletRespone

reponse内置对象<jsp:reponse>

ServletActionContext.getResponse()

实现ServletResponseAware接口

 
HttpSession session内置对象<jsp:session>

ServletActionContext.getRequest().getSession()

实现SessionAware接口

 

你可能感兴趣的:(jsp servlet Action获取request,respone,session等)