Wicket in OSGI

Another task of the day: How do I integrate Wicket with OSGI?

-Use the ExtHttpService of Felix to be able to register Filters as required by Wicket
-To get around the classloader issues, create your own WicketFilter extension and return this.getClass().getClassLoader() in getClassLoader() of the extended filter:
-Create a standard Wicket app and remember to copy the proper .html files to compile dir with your build environment
-give to registerFilter() the properties as parameter with “applicationName” set to your Wicket application name. The link above says “init.applicationName” but the “init.” will cause it to fail. Maybe you need it with the whiteboard but don’t understand the use of that in general.
-add Wicket jar file to your bundle and its classpath

now it should load at the root of “localhost:8080” or whatever port is configured in felix configuration.properties for the webserver port.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s