Home » Eclipse Projects » Equinox » org.eclipse.equinox.http.servlet.jar
| |
Re: org.eclipse.equinox.http.servlet.jar [message #132774 is a reply to message #132762] |
Thu, 11 June 2009 09:50 |
Maurizio Messages: 34 Registered: July 2009 |
Member |
|
|
Dear Simon,
Thanks again for your reply.
I downloaded the JAR file from the URL that you indicated, and that's OK.
Dispite that I think I need some help while trying the "OSGi Web
application development with Server-Side Equinox", that I followed at
" http://www.javaworld.com/javaworld/jw-06-2008/jw-06-osgi3.ht ml?page=1".
This article indicates the need of the following bundles:
javax.servlet v2_4
org.apache.commons.logging v1_0_4
org.eclipse.equinox.http.jetty
org.eclipse.equinox.http.registry
org.eclipse.equinox.http.servlet
org.mortbay.jetty v5_1_11
I have installed all of them in my Equinox container, where I'm using
"org.eclipse.osgi_3.5.0.v20090520.jar".
This is what I can see from the Equinox console:
osgi> ss
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.5.0.v20090520
4 RESOLVED org.eclipse.equinox.http_1.0.200.v20080421-2006
5 RESOLVED javax.servlet_2.5.0.v200806031605
10 RESOLVED org.apache.commons.logging_1.0.4.v20080605-1930
12 INSTALLED
org.eclipse.equinox.http.registry_1.0.100.v20080427-0830
13 RESOLVED org.mortbay.jetty_5.1.14.v200806031611
14 RESOLVED org.eclipse.equinox.common_3.4.0.v20080421-2006
15 RESOLVED org.eclipse.equinox.http.servlet_1.0.200.v20090520-1800
16 INSTALLED org.eclipse.equinox.http.jetty_2.0.0.v20080425
osgi>
Until here, I don't see problems.
What the article tells now is "verify that you can access the Jetty server
by pointing your browser to http://localhost/".
At this point I would imagine that I should start the Jetty server from
the console, but if I type "start 13" I just get back the "osgi>" prompt
without any message from the Jetty server and, more important, when I try
to activate the browser at "http://localhost/" I cannot see anything like:
HTTP ERROR: 404
ProxyServlet: /
RequestURI=/
Powered by Jetty://
So, I would conclude that the Jetty server is not active, at all.
So the questions are:
1. Should I just start Jetty (bundle 13) or I should start some of the
other bundle manually first?
2. If it is so, which is the order, if it is important?
If this is not the proper root to follow, please can you address me
through some further explanation about "Web application development with
Server-Side Equinox"?
Thanks very much.
Kind regards.
Maurizio
|
|
|
Re: org.eclipse.equinox.http.servlet.jar [message #133011 is a reply to message #132774] |
Sun, 14 June 2009 12:43 |
Jochen Hiller Messages: 11 Registered: July 2009 |
Junior Member |
|
|
Hi Maurizio,
Maurizio wrote:
> Dispite that I think I need some help while trying the "OSGi Web
> application development with Server-Side Equinox", that I followed at
> " http://www.javaworld.com/javaworld/jw-06-2008/jw-06-osgi3.ht ml?page=1".
> This article indicates the need of the following bundles:
> javax.servlet v2_4 org.apache.commons.logging v1_0_4
> org.eclipse.equinox.http.jetty org.eclipse.equinox.http.registry
> org.eclipse.equinox.http.servlet org.mortbay.jetty v5_1_11 I have
> installed all of them in my Equinox container, where I'm using
> "org.eclipse.osgi_3.5.0.v20090520.jar".
Be careful: This article is based on Eclipse 3.4.x, which is using Jetty
5.1.x.
Eclipse 3.5.x is now based on Jetty 6 which requires different bundles.
> This is what I can see from the Equinox console:
> osgi> ss
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.5.0.v20090520
> 4 RESOLVED org.eclipse.equinox.http_1.0.200.v20080421-2006
> 5 RESOLVED javax.servlet_2.5.0.v200806031605
> 10 RESOLVED org.apache.commons.logging_1.0.4.v20080605-1930
> 12 INSTALLED
> org.eclipse.equinox.http.registry_1.0.100.v20080427-0830
> 13 RESOLVED org.mortbay.jetty_5.1.14.v200806031611
> 14 RESOLVED org.eclipse.equinox.common_3.4.0.v20080421-2006
> 15 RESOLVED org.eclipse.equinox.http.servlet_1.0.200.v20090520-1800
> 16 INSTALLED org.eclipse.equinox.http.jetty_2.0.0.v20080425
>
> osgi>
I would recommend to use latest Equinox SDK 3.5 build, probably as a
separate target platform, or use Eclipse 3.5 with self hosted target
platform.
The most simple way to setup a launch configuraton is: select
"org.eclipse.equiox.http.jetty_2.0.0....." and then click "all required
bundles". Validate plugins, and everything should work.
Background: the o.e.e.htpp.jetty_2.0.0 is the HTTP adaptor for Jetty 6.x.
>
> Until here, I don't see problems.
>
> What the article tells now is "verify that you can access the Jetty
> server by pointing your browser to http://localhost/".
> At this point I would imagine that I should start the Jetty server from
> the console, but if I type "start 13" I just get back the "osgi>" prompt
> without any message from the Jetty server and, more important, when I
> try to activate the browser at "http://localhost/" I cannot see anything
> like:
> HTTP ERROR: 404
> ProxyServlet: /
> RequestURI=/
> Powered by Jetty://
The OSGi bundle which starts the OSGi HtpService is not the Jetty
bundle, use instead again the "o.e.e.http.jetty_2.0.0..." adaptor bundle.
>
> So, I would conclude that the Jetty server is not active, at all.
>
> So the questions are:
> 1. Should I just start Jetty (bundle 13) or I should start some of the
> other bundle manually first?
See above
> 2. If it is so, which is the order, if it is important?
Ordering is not important, as all required bundles (jetty, jetty.util)
only needs to be installed and resolved, but not started.
>
> If this is not the proper root to follow, please can you address me
> through some further explanation about "Web application development with
> Server-Side Equinox"?
We gave a tutorial at EclipseCon 2009 about building web applications
with OSGi and Equinox. See presentation at
http://www.eclipsecon.org/2009/sessions?id=264
>
> Thanks very much.
> Kind regards.
> Maurizio
>
>
>
Bye, Jochen
|
|
| |
Re: org.eclipse.equinox.http.servlet.jar [message #135476 is a reply to message #133011] |
Fri, 10 July 2009 17:27 |
Andreas Goetz Messages: 110 Registered: July 2009 |
Senior Member |
|
|
Hello Jochen,
I'm having exactly the same problems embedding jetty in my
plugin/feature. The trick is to get the http service started. It seems
to come up automatically when adding -Dorg.osgi.service.http.port=xyz to
the command line.
I've also tried programmatic approaches (e35) but not a single one
worked reliably.
>> Dispite that I think I need some help while trying the "OSGi Web
>> application development with Server-Side Equinox", that I followed at
>> " http://www.javaworld.com/javaworld/jw-06-2008/jw-06-osgi3.ht ml?page=1".
>> This article indicates the need of the following bundles:
>> javax.servlet v2_4 org.apache.commons.logging v1_0_4
>> org.eclipse.equinox.http.jetty org.eclipse.equinox.http.registry
>> org.eclipse.equinox.http.servlet org.mortbay.jetty v5_1_11 I have
>> installed all of them in my Equinox container, where I'm using
>> "org.eclipse.osgi_3.5.0.v20090520.jar".
>
> Be careful: This article is based on Eclipse 3.4.x, which is using Jetty
> 5.1.x.
> Eclipse 3.5.x is now based on Jetty 6 which requires different bundles.
I believe except for the version number the bundles are still the same.
> The most simple way to setup a launch configuraton is: select
> "org.eclipse.equiox.http.jetty_2.0.0....." and then click "all required
> bundles". Validate plugins, and everything should work.
> ...
> The OSGi bundle which starts the OSGi HtpService is not the Jetty
> bundle, use instead again the "o.e.e.http.jetty_2.0.0..." adaptor bundle.
Not sure what you're saying here. If I'm trying bundle.start() do I need
to start org.eclipse.equinox.http or org.eclipse.equinox.http.jetty? How
can I make sure that also the servlet bridge and the registry come up-
do I need to ensure manual startup of all these bundles?
If I want to check if the http service is up, or attach a
ServiceListener to it, what do I need to check for using
context.getServiceReference()- against org.eclipse.equinox.http,
org.eclipse.equinox.http.jetty or really org.osgi.service.http.HttpService?
> We gave a tutorial at EclipseCon 2009 about building web applications
> with OSGi and Equinox. See presentation at
> http://www.eclipsecon.org/2009/sessions?id=264
Took a look, but honestly not too helpful if you're not
OSGi-knowledgable already, sorry (no offence meant).
I'd be happy though- once I get this sorted out- to provide a writeup of
my experiences for http://www.eclipse.org/equinox/server/http_in_equinox.php
Best regards,
Andreas
|
|
| |
Goto Forum:
Current Time: Thu Apr 25 04:09:31 GMT 2024
Powered by FUDForum. Page generated in 0.04179 seconds
|