[....] public void init(ServletConfig config) throws ServletException { super.init(config); ServletContext servletContext = config.getServletContext(); WebApplicationContext webApplicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext); [...]