Adding pages to an OSGI webapp using bundles

253 Views Asked by At

I have a Spring MVC webapp which runs in an OSGi container using Spring DM 2. For the moment, the view technology I use is JSP.

I would like to optionally add features to my app by packaging pages and @Controllers into bundles. I can achieve that using fragment, which means all the fragments files would virtually end up in the webapp bundle at runtime. I find this way a little messy...

Is there any way I could package extensions to my webapp in regular bundles instead of fragments ? Would a view engine other than JSP help ?

1

There are 1 best solutions below

0
On

I created a bundle that maps any content in a 'static' directory in a bundle to the web. It is trivial to track active bundles with the BundleTracker and then register them with a servlet.