ServletContext and Spring MVC
How can I get the S开发者_开发问答ervletContext inside an Interceptor in Spring MVC 3?
Since interceptor is a bean, you can simply autowire it:
@Autowired
ServletContext context;
Please look at this example
http://www.vaannila.com/spring/spring-interceptor.html
and then request.getSession().getServletContext()
精彩评论