Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Equinox jetty in RCP application
Equinox jetty in RCP application [message #128912] Thu, 09 April 2009 17:41 Go to next message
Florian Hackenberger is currently offline Florian HackenbergerFriend
Messages: 123
Registered: July 2009
Senior Member
Hi!

How can I make sure jetty is started and has registered all my (JSP)
servlets which are declared using the
org.eclipse.equinox.http.registry.servlets extension point?

I'm passing the -Dorg.eclipse.equinox.http.jetty.autostart=true property
(set in the .product file) and do the following in my Application.start()
method:

Bundle bundle = Platform.getBundle("org.eclipse.equinox.http.jetty");
if(bundle.getState() == Bundle.RESOLVED) {
bundle.start(Bundle.START_TRANSIENT);
}
bundle = Platform.getBundle("org.eclipse.equinox.http.registry");
if((bundle.getState() & Bundle.RESOLVED) == 0) {
bundle.start(Bundle.START_TRANSIENT);

while that makes jetty start, my servlets are still not registered when
starting the exported RCP product. It works however when running within
eclipse. Is there something I might have missed? BTW: Is there a more
elegant way of making sure the jetty and http.registry bundles are started?

Cheers,
Florian
--
DI Florian Hackenberger
florian@hackenberger.at
www.hackenberger.at
Re: Equinox jetty in RCP application [message #135335 is a reply to message #128912] Fri, 10 July 2009 12:09 Go to previous messageGo to next message
Andreas Goetz is currently offline Andreas GoetzFriend
Messages: 110
Registered: July 2009
Senior Member
Hi Florian,

did you figure out an answer to this one? I'm stuck at the same point.
Got it working (i.e. started automatically) by adding
-Dorg.osgi.service.http.port=8081 to the command line.

Best regards,
Andreas


On 09.04.2009 19:41, DI Florian Hackenberger wrote:
> Hi!
>
> How can I make sure jetty is started and has registered all my (JSP)
> servlets which are declared using the
> org.eclipse.equinox.http.registry.servlets extension point?
>
> I'm passing the -Dorg.eclipse.equinox.http.jetty.autostart=true property
> (set in the .product file) and do the following in my Application.start()
> method:
>
> Bundle bundle = Platform.getBundle("org.eclipse.equinox.http.jetty");
> if(bundle.getState() == Bundle.RESOLVED) {
> bundle.start(Bundle.START_TRANSIENT);
> }
> bundle = Platform.getBundle("org.eclipse.equinox.http.registry");
> if((bundle.getState()& Bundle.RESOLVED) == 0) {
> bundle.start(Bundle.START_TRANSIENT);
>
> while that makes jetty start, my servlets are still not registered when
> starting the exported RCP product. It works however when running within
> eclipse. Is there something I might have missed? BTW: Is there a more
> elegant way of making sure the jetty and http.registry bundles are started?
>
> Cheers,
> Florian
Re: Equinox jetty in RCP application [message #489185 is a reply to message #135335] Thu, 01 October 2009 18:31 Go to previous messageGo to next message
Steve Viens is currently offline Steve ViensFriend
Messages: 13
Registered: July 2009
Junior Member
Andreas, Florian,

Did you ever figure this out? I'm trying to do the same thing and stuck in what appears to be the same place.

Steve
Re: Equinox jetty in RCP application [message #490503 is a reply to message #128912] Thu, 08 October 2009 20:40 Go to previous message
Steve Viens is currently offline Steve ViensFriend
Messages: 13
Registered: July 2009
Junior Member
I've posted a solution in the RCP forum:

http://www.eclipse.org/forums/index.php?t=msg&goto=48921 9&S=afabc9e0691ef29f275402fb43a13b38#msg_489219

Previous Topic:How to add new system property for next restart
Next Topic:RCP App - Missing add button when Help -> Install New Software
Goto Forum:
  


Current Time: Sat Apr 27 00:35:00 GMT 2024

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

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

Back to the top