1.
private Manager manager; @Override public void init() throws ServletException { super.init(); ServletContext servletContext=this.getServletContext(); ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext); manager = (Manager) ctx.getBean("manager"); }