PDA

View Full Version : web-extender inside servlet bridge web app ?


boianvojda
Jun 9th, 2008, 05:52 PM
Hi,
is it possible to run web extender within servlet bridge.

I mean to have Tomcat with bridge application deployed.
Inside the bridge web appliaction to have an OSGI framework launched by the bridge web app.
Inside the OSGI to have web extender installed.

If it is possible, once an web application is installed as OSGI bindle - how it will be accessed ? I mean what is going to be the ContextRoot of the installed web app OSGI bundle ?

jmcginn
Jun 10th, 2008, 12:49 PM
boianvojda

See my post a little further down on the page where I have done this very thing:

"Catalina, Spring DM, Equinox, and JNDI"

There are at least a couple of issues:
#1. If you are using the equinox servlet bridge you have to disable it from exporting the servlet 2.4 spec as spring web extender expects 2.5 and having the 2.4 spec exported seems to mess up something and none of my WARs got deployed. I did this by deleting all the eclipse bundles in the bridge except the core osgi bundle.

#2. The web extender deploys wars to a temp file and folder in your home directory (user home directory like /user/myname in unix or /Docs & Settings/blah in windows). This is where you context root will be and it changes everytime you redeploy the bundle which is everytime you launch :(.

If you look in my post I mentioned above you can see where I had to create a custom WAR deployer to deploy to a fixed location so I could have a fixed context root.

Hope that helps.

boianvojda
Jun 11th, 2008, 08:25 AM
Hi,
first I want to thank you for the reply.

#1 - I was able to achieve this.
#2 - You can look at pax web-extender to see how they are deployng WAR on OSGI.
For your web app context root it will use Bundle-SymbolicName as default,
but you can explicitely set it by adding Webapp-Context in MNIFEST.MF


Pax Web Extender WAR is an extender bundle that makes possible to deploy WAR files into OSGi. It depends on Pax Web that extends OSGi Http Service with better servlet support, filters, listeners, error pages and JSPs.

Pax Web is providing this by using Jetty installed in OSGI :-(

I will be really happy if I can use OSGI + pax web-extender inside Jetty.

Since I am not allowed to post URL's, will post them by removing the protocol.
To access the following URL's, you need just to add http prefix in front :-)

wiki.ops4j.org/confluence/display/ops4j/Pax+Web+Extender
wiki.ops4j.org/confluence/display/ops4j/Pax+Web+Extender+-+War+-+Supported+Elements

Costin Leau
Jun 20th, 2008, 07:47 AM
Hi guys,

There are two issues on JIRA for both #1 and #2 which should be fixed in the next releases.
#1: OSGI-535
#2: OSGI-531, OSGI-532 which I believe where raised by John himself

You can monitor them for progress.

Cheers,