I would like to access an already initialized spring-bean defined in the spring-servlet.xml which is used in the creation of a servlet in web.xml
so far I've seen:
ApplicationContext context = WebApplicationContextUtils.getWebApplicationContex t(getServletContext());Object myDao = context.getBean("daoBeanName");
but the thing is that it does not work
getServletContext() is not recognized by java for some reason...
any help would be greatly appreciated!