Both Wicket and Ofbiz are from ASF (Apache Software Foundation) but unfortunately not many ppl seem to have used them together.
Primary reason for me to use them together was complexity and amount of configuration required to use existing Ofbiz frontend frameworks such as screen widget and learning additional technologies such as freemarker, beanshell etc. That lead me to look for a framework which would replace that and provide more - hence Apache Wicket.
Now that we have some background, lets see what you need to get started and use Wicket "inside" Apache Ofbiz.
- Ofbiz comes with embedded Tomcat at the time of writing Ofbiz 4.0 came with Tomcat 5.5.23 and fortunately Wicket can be deployed in any standard web container
- Download wicket binaries from Apache Wicket site, copy them over to your Ofbiz application lib directory where you have your application and other 3rd party jars. I chose to put it under hot-deploy/myapp/webapp/myapp/WEB-INF/lib
- Add WicketFilter entry to your web.xml file (Note: Both WicketFilter and Ofbiz ContextFilter will be listening on /* requests - so initially there will be chaining of those filters, but for this first article I will ignore that) - Make sure to put WicketFilter entry before ContextFilter so WicketFilter gets called first
- Write your first Hello World in Wicket by creating your WebApplication and WebPage classes - access the URL (http://localhost:8080/yourappcontext) and see it in action, where yourappcontext is whatever you configured it to be in your ofbiz-component.xml file