SpringWebApplicationFactory allows two places to defined a WebApplication:
- in the global root application context loaded by Spring's ContextLoaderListener
- in a filter-specific additional web applcation context.
SpringComponentInjector is not aware of this additional context but just uses the global one. This imposes the following restrictions:
- the filter-specific context cannot define any beans to be used by SpringComponentInjector
- SpringComponentInjector cannot work without a global root application, i.e.ContextLoaderListener is required.
Starting with Wicket 6.7.0 the filter-specific context is made accessible to SpringComponentInjector. If no application context is given explicitly to SpringComponentInjector's constructor, by default the injector uses the application context used to create the WebApplication.
- no need to define ContextLoaderListener in web.xml (i.e. less xml)
- use application-specific beans defined in the filter-specific application context