I am trying to get the Spring ApplicationContext from the ServletContext
using the following code

WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);

the reason is to access beans defined in the application-Context.xml file.

I get the following error

java.lang.IllegalStateException: No WebApplicationContext found : no
ContextLoaderListener registered?

in my web.xml the ContextLoaderListener is defined as

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
<listener>

I have also checked that the servletContext is indeed injected into my class
from Spring (and its not null)
I am using JBoss4.2.2 GA with Apache CXF and Spring 3.0.5.RELEASE

Any help much appreciated.

Thanks
Amit

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Error-getting-Spring-Application-context-tp5433615p5433615.html
Sent from the cxf-issues mailing list archive at Nabble.com.

Reply via email to