Equinox and Jetty Server [message #110771] |
Tue, 27 May 2008 09:47  |
Eclipse User |
|
|
|
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 05:05   |
Eclipse User |
|
|
|
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 14:15   |
Eclipse User |
|
|
|
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 #111270 is a reply to message #111245] |
Sun, 01 June 2008 16:49  |
Eclipse User |
|
|
|
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 ;)
|
|
|
Powered by
FUDForum. Page generated in 0.04044 seconds