SpringMVC中:
Struts中:
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder .getRequestAttributes()).getRequest();
- <listener>
- <listener-class>
- org.springframework.web.context.request.RequestContextListener
- </listener-class>
- </listener>
Struts中:
HttpServletRequest request = ServletActionContext.getRequest();