I have done some work to locate the Spring application context in
another way. Both wicket-spring and wicket-spring-annot assume that the
application context can be obtained with

Luckily, it is easy to write my own IWebApplicationFactory which does
the appropriate lookup and I am still able to extend
SpringWebApplication. Nevertheless, this does not work because
SpringComponentInjector also hardcodes a lookup of the application
context using WebApplicationContextUtils.

The code is like this:      

public SpringComponentInjector(WebApplication webapp) {
                // locate spring's application context ...
                ServletContext sc =

                final ApplicationContext ctx = WebApplicationContextUtils


In other words, a redundancy. In my opinion, the code should be modified
as follows:

1. Add a new constructor which accepts the ApplicationContext as a
2. Remove the existing constructor with the WebApplication OR document
it to use the WebApplicationContextUtils
   for retrieving the application context

What do you think?


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Wicket-user mailing list

Reply via email to