I can access Spring beans in my Servlets using
WebApplicationContext springContext =
WebApplicationContextUtils.getWebApplicationContext(getServletContext());
in the Servlet’s init method.
I was wondering is there an equivalent of the WebApplicationContext for servlet filters?
Also, is it possible to access Spring beans in a tag class?
For filters – use
Filter.init():For tags – use
TagSupport.pageContext(note that it’s not available inSimpleTagSupport):