Wicket becomes Guicelicious
In this post I’ll describe, how to get the Wicket Guice example up and running.
According to the projects homepage, Guice is a lightweight dependency injection framework for Java 5 which wholly embraces annotations and generics, thereby enabling you to wire together and test objects with less effort than ever before. Annotations finally free you from error-prone, refactoring-adverse string identifiers.
The example is very small and easy to understand, that’s why I don’t post any source code explaining how to integrate Guice and Wicket. You can read about this here or in several other blogs mentioned on the Wicket homepage.
The example did not work with the latest 1.2.x stable release of Wicket which I downloaded, so I switched to a 1.3.x snapshot release from the SVN repository. After figuring out which libraries the example needs in order to deploy (I deploy from Netbeans 5.5 to the Sun Java System Application Server Platform Edition 9.0 update 1) and run properly, the example worked like charm :-)
The (nearly unmodified) Wicket HelloWorld and Guice examples including all required libraries are available for download. If you unzip the archive and create a new Netbeans (5.5) web application with existing sources from it, you’ll be able to run the examples in no time. The examples should also run in Tomcat, but I haven’t tried that yet. And it should be fairly easy to get them running in other IDEs too, but I also have no experience with that.
The following screenshots show the project creating dialogue in Netbeans 5.5.



Filed under: Java on July 23rd, 2007
Leave a Reply