Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » How to create a web-bundle?
How to create a web-bundle? [message #632235] Tue, 12 October 2010 04:44 Go to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Here comes my next question. I have created a bundle with sts tooling and now I want to make a web-bundle out of it. I found posts about web-modules but they seen to be deprecated or not longer supported when I got it right.
Where to put web.xml, simply in WEB-INF on my classpath ? will the servlet-context xml pick up my bundle context as root context ?

Re: How to create a web-bundle? [message #632239 is a reply to message #632235] Tue, 12 October 2010 04:57 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The short answer is that you can either use a standard WAR file or a Web Application Bundle (WAB) which is described in the Web Applications chapter of the OSGi Enterprise Spec v4.2.

In a WAB, web.xml sits in the WEB-INF directory.

I'm not sure about the answer to your other question (for some reason this web stuff never sticks in my mind - my defence is Rutherford's "All science is either physics or stamp collecting." I regard the kernel as physics... Wink), so please refer to the OSGi spec for details. Certainly the servlet context is published as an OSGi service using the WAB's bundle context.
Re: How to create a web-bundle? [message #632245 is a reply to message #632239] Tue, 12 October 2010 05:24 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Thanks for pointing me to the spec. Its chapter 128 in the enterprice spec. Seems to be simple then. Just put in WEB-INF and the Context-Path. I'll try that tomorrow.

If you talk about physics I feel sad, you should see what I do in my daytime job. Maybe I want to volunteer for virgo, should I go for the dev-list then ?
Re: How to create a web-bundle? [message #632252 is a reply to message #632245] Tue, 12 October 2010 06:01 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I'm not sure whether you are thinking of bringing your web skills to Virgo or escaping the web by fleeing to the Virgo kernel, but whatever your motivation, you'll be very welcome to get involved in Virgo development should you wish to. Very Happy

Certainly subscribe to virgo-dev for starters. Take a tour round the Virgo wiki to get a perspective on the internals. Then pick a likely looking bug - most current bugs are enhancements - and see if you can solve it and provide a patch. Smile

You should also take a look at our sister project Gemini Web for the core of the web function.
Re: How to create a web-bundle? [message #633437 is a reply to message #632235] Sun, 17 October 2010 18:02 Go to previous message
Kostas Kougios is currently offline Kostas Kougios
Messages: 42
Registered: August 2010
Member
Hi Thomas, WAB is something I've to see myself, but in the meantime please find attached an experimental war file that I am bulding for my own fun. Not so useful as an app to you but definitely you can check it's structure.

I am not using STS myself, I'd rather just create good-old war & jar files for my bundles based on plain J2ee Eclipse with the help of maven to handle dependencies. But probably STS is your best option of an IDE and I don't know if they provide a wizard for web bundles. I got a book which says that you need to create a standard web project, add bundle project nature and publish it under your virgo runtime.
Previous Topic:Provisioning project dependencies in Virgo
Next Topic:Adding bundle to dm server to extend tomcat
Goto Forum:
  


Current Time: Sat Aug 23 13:32:25 EDT 2014

Powered by FUDForum. Page generated in 0.01785 seconds