I'm trying to add an OpenSessionInViewFilter to a SpringDM-based web application to allow lazy loading via Hibernate. I've added the filter mapping to the MANIFEST.MF for the web bundle:
And the corresponding bean definition is in META-INF/spring/module-context.xml:Code:Web-FilterMappings: openSessionInViewFilter;url-patterns:="*.htm"
There is no web.xml under WEB-INF.Code:<bean id="openSessionInViewFilter" class="org.springframework.orm.hibernate3.support.OpenSessionInViewFilter" />
Without the filter mapping configured, all pages work fine (albeit with lazy loading issues), but with the filter mapping added when I hit any *.htm page I get:
Am I missing something somewhere?Code:java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:70) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:241) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.lookupSessionFactory(OpenSessionInViewFilter.java:227) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:171) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)


