Today I tried to insert Spring Security into an existing application.
I ran into the following error after configuring a DelegatingFilterProxy and creating a spring security context with auto config. I imported the context from my web application context.
Code:
java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:160)
After configuring the listener everything worked again.
So I wonder, why do i need the context loader listener instead of using imports?