Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Equinox and Jetty Server
Equinox and Jetty Server [message #110771] Tue, 27 May 2008 13:47 Go to next message
Kees Pieters is currently offline Kees PietersFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

This is basically a Jetty specific question, but I hope someone may know the answer anyway...
I am currently using org.eclipse.equinox.http.jetty as a standalone server and this seems to work fine. However, I would like to add some specific objects in the server context in another plugin. Is there any way to achieve this?

Thanks

Kees
Re: Equinox and Jetty Server [message #111019 is a reply to message #110771] Fri, 30 May 2008 01:52 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 381
Registered: July 2009
Senior Member
You're not the first to ask. Gunnar has wanted to do this for sometime
however we never have had the time to really make it API.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178985

-Simon


"Kees Pieters" <cees_pieters@wxs.nl> wrote in message
news:13287186.8631211896102160.JavaMail.root@cp1.dzone.com...
> Hi,
>
> This is basically a Jetty specific question, but I hope someone may know
> the answer anyway...
> I am currently using org.eclipse.equinox.http.jetty as a standalone server
> and this seems to work fine. However, I would like to add some specific
> objects in the server context in another plugin. Is there any way to
> achieve this?
>
> Thanks
>
> Kees
Re: Equinox and Jetty Server [message #111044 is a reply to message #111019] Fri, 30 May 2008 09:05 Go to previous messageGo to next message
Kees Pieters is currently offline Kees PietersFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Simon,

Thanks for the answer. I have been looking at some options, and there seem to be some openings. I could offer the server as an equinox service to the other plugins, which would (maybe, I still have to try this) allow me to at least add the resources of the other plugins (jsp, html, etc). However, I then still need a way to add the servlets. Do you happen to know if the addClasspath method of HttpContext might be of help?
I know that it is possible to use the extensions to achieve the same functionality, but it would be nice to package the entire WAR as a resource, or at least that the web.xml provided by a plugin could be included in the server.

Any ideas?

Thanks

Kees
Re: Equinox and Jetty Server [message #111081 is a reply to message #111044] Fri, 30 May 2008 18:15 Go to previous messageGo to next message
Richard Backhouse is currently offline Richard BackhouseFriend
Messages: 19
Registered: July 2009
Junior Member
We had a similar requirement to what you describe while developing Jazz
(http://jazz.net). Our solution was to create a bootstrap bundle that
setup a Jetty Server instance along with an extension point for
providing Web Application contexts. Each context provided its own copy
of a web.xml along with the context root to use. A Web Context bundle
can share classes and resources just by providing the necessary package
imports in its Manifest.

The trick to all of this is the classloader used by the HttpContext
object passed to the server via the addContext() call. This classloaded
must be able to load classes (or delegate) from the Jetty Bundle and
also from the bundle representing the Web Context.

Richard

Kees Pieters wrote:
> Hi Simon,
>
> Thanks for the answer. I have been looking at some options, and there seem to be some openings. I could offer the server as an equinox service to the other plugins, which would (maybe, I still have to try this) allow me to at least add the resources of the other plugins (jsp, html, etc). However, I then still need a way to add the servlets. Do you happen to know if the addClasspath method of HttpContext might be of help?
> I know that it is possible to use the extensions to achieve the same functionality, but it would be nice to package the entire WAR as a resource, or at least that the web.xml provided by a plugin could be included in the server.
>
> Any ideas?
>
> Thanks
>
> Kees
Re: Equinox and Jetty Server [message #111199 is a reply to message #111081] Sat, 31 May 2008 08:23 Go to previous messageGo to next message
Kees Pieters is currently offline Kees PietersFriend
Messages: 24
Registered: July 2009
Junior Member
Hi Richard,

That sounds interesting! I think Jetty/Equinox could benefit from an approach where A WAR-like resource structure is packaged as components in the plugins, which are dynamically loaded in the Jetty server. It seems a bit more promising than the current extension where resource paths and servlets are defined in the extension itself.
I would think that your approach is already halfway there if not fully! Do you think that JAZZ could provide this bootstrap plugin for the community or is it commercial?

Thanks again,

Kees
Re: Equinox and Jetty Server [message #111245 is a reply to message #111199] Sun, 01 June 2008 12:11 Go to previous messageGo to next message
Richard Backhouse is currently offline Richard BackhouseFriend
Messages: 19
Registered: July 2009
Junior Member
Kees,

Jazz falls under an Open Commercial Software license. However, it is not
out of the realms of possibility that some pieces could be donated to
Eclipse. This component in particular is only used for development
purposes and could easily be decoupled. I feel it has value outside of
the scope of Jazz alone.

Richard


Kees Pieters wrote:
> Hi Richard,
>
> That sounds interesting! I think Jetty/Equinox could benefit from an approach where A WAR-like resource structure is packaged as components in the plugins, which are dynamically loaded in the Jetty server. It seems a bit more promising than the current extension where resource paths and servlets are defined in the extension itself.
> I would think that your approach is already halfway there if not fully! Do you think that JAZZ could provide this bootstrap plugin for the community or is it commercial?
>
> Thanks again,
>
> Kees
Re: Equinox and Jetty Server [message #111270 is a reply to message #111245] Sun, 01 June 2008 20:49 Go to previous message
Kees Pieters is currently offline Kees PietersFriend
Messages: 24
Registered: July 2009
Junior Member
Yeah,

I think equinox-as-a-server is gaining momentum in the past year or so, so I guess my question is one that is going to be asked more often. it would be nice if there's a solution ready ;)
Previous Topic:Eclipse 3.3: How to configure embedded JSP support?
Next Topic:Uninstalling plugin
Goto Forum:
  


Current Time: Fri Apr 26 16:46:46 GMT 2024

Powered by FUDForum. Page generated in 0.03061 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top