Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 7 and knopflerfish 3

Hi there,
Many thanks for the feedback and sorry or such a late response.

On Fri, Aug 13, 2010 at 9:05 AM, L. Mollea <lmollea@xxxxxxxx> wrote:
>  I succesfully installed and run an instance of Jetty 7 (latest version,
> 7.1.6) inside Knopflerfish 3.0. I got working servlets, JSPs and
> continuations. Did not test tag libraries.
Core tag libraries will work out of the box in theory.
Custom tag libraries that are packaged inside a bundle currently can
only be added at the scope of the server.
It is necessary to list the id of the bundles that contains tld files
as part of the OSGiAppProvider's arguments.

> My goal was to install war archives that could have access to the
> BundleContext so that servlets could interact with other services installed
> inside the OSGi framework.
> There has been a couple of confusing moments, especially when I found that
> the jetty.xml in the "etc" directory (not the etc inside the jetty.osgi.boot
> bundle), installs either a WebAppProvider (that - as in the jetty standalone
> configuration - monitors the contexts directory for xml files and the
> webapps directory for wars) and also an OSGIAppProvider that installs web
> applications only via contexts (and monitors the same directories as the
> WebAppProvider). Seeing that a WebAppProvider and an OSGiAppProvider seems
> similar, I'd like to know if a WebAppProvider should not be used inside an
> OSGi installation and if it could cause problems (i.e. classloading
> problems).
> But anyway, the only way I found I could install a war that could have
> access to its bundlecontext is only by installing and *starting* a war file
> like it was a bundle (i.e. with a META-INF/MANIFEST.MF correctly set up). I
> don't know if the OSGiAppProvider can insert the bundlecontext property
> inside the servlet contexts, by just looking at the source code it doesn't
> seems to me. The wiki page
> ( doesn't clearly states
> how this feature can be enable and used.

I need to review and improve the OSGIAppProvider.
However in fact WebAppProvider has a completly different
functionality: it will deploy web-applications inside the webapps
folder (or another folder really). OSGIAppProvider only deploys

When you installed a war file as a bundle in fact the OSGiAppProvider
is picking up that event and starting the corresponding webapp.

> The only problems I encountered were using the test.war that comes with the
> jetty binary distribution.
> Loading it from the webapp directory using the AppDeployer causes the
> following errors:
> - TransparentProxy fails to be installed as it generates a
> NoClassDefFoundError for (i had the framework
> bootdelegating * and put and into exported system
> packages). I could not find the cause for this exception.

We could file a bug for this.

> - TestFilter causes a NoClassDefFoundError on init for
> org/eclipse/jetty/util/log/Log
> I should note that test.war contains jetty jars inside its WEB-INF/lib
> directory that I removed before deploying it into the webapp directory.
> There is also a strange ClassNotFoundException for
> org.eclipse.jetty.jsp.JettyLog. I traced the source of the problem in the
> WebXmlProcessor class inside org.eclipse.jetty.webapp package, but it seems
> that the JettyLog class isn't bundled anywhere (it is in the jetty-jsp-2.1
> module inside the jetty source distribution but that module seems like it
> isn't packaged as a bundle). Looking at the code for that class there's also
> a dependency from package so probably
> that would cause some issues.

I filed a bug here:

> That's all; attached you can find a working init.xargs for knopflerfish;
> your path may (of course) vary.
> Regards
> --
> LM

Many thanks again,

> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx

Back to the top