Test driving the Knopflerfish HTTP Console
Some weeks ago in this blog we saw how to install the Apache Felix Web Console to manage your OSGi framework.
The Felix Web Console is a quite complex and customizable tool, but if you are more looking for a very lightweight alternative, you may want to have a look at the Knopflerfish HTTP Console.
Let’s take it for a test drive.
First of all, to install the Knopflerfish HTTP Console you will need:
- the OSGi Compendium Bundle: http://repository.ops4j.org/maven2/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar
- an OSGi HTTP Service Implementation: http://apache.prosite.de/felix/org.apache.felix.http.jetty-1.0.1.jar
- and of course the Knopflerfish HTTP Console jar: http://www.knopflerfish.org/repo/jars/httpconsole/httpconsole-2.0.1.jar
The other important thing you need is to set the org.osgi.service.http.port property value; in fact, by default, the Http Service will try to start at port on port 80, causing an exception of Unix systems.
Feeling lazy (every developer is lazy..)? I’ve prepared a Pax-Runner file for you. Assuming you have Pax Runner installed, just type
$ pax-run.sh http://osgilook.com/static/samples/kf-http-console.txt
and you are ready to rock!
Now opening your browser at http://localhost:8080/servlet/console you have access to the Knopflerfish console in all its glory.
The functionalities offered by this tool are pretty basic. There’s the Bundle View, where you can see its headers and services exposed:

It is possible to select a single service to display all its properties:

And it’s of course possible to install a bundle directly from the web interface:
In summary, the functionalities offered are just basic compared to the Apache Felix Web Console; however, being the user interface so simple (and usable also with small screens), it’s quite ideal if you want to check the status of your OSGi framework deployed on a mobile device.
Want to know more?
$ pax-run.sh http://osgilook.com/static/samples/kf-http-console.txt
Cannot be simpler than that!
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.



It can
pax-run –profiles=knopflerfish.webconsole
Kidding. I just added the above profile to Pax Runner as it is helpful.
BTW, useful tutorials your last blogs. Keep it coming.
Alin