Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Jetty Hello World
Jetty Hello World [message #987541] Tue, 27 November 2012 05:24 Go to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hi,

I am trying to setup Equinox with embedded Jetty. I have purchased the OSGi and Equinox book and read many web resources but cannot connect the dots still.

My bundle is id 9 below. Have I started Jetty? Can someone please point me in the right direction or a good tutorial on the next steps.

Thanks
Eban

osgi> ss
"Framework is launched."


id	State       Bundle
0	ACTIVE      org.eclipse.osgi_3.8.1.v20120830-144521
	            Fragments=20, 21, 22
1	ACTIVE      org.eclipse.jetty.io_8.1.3.v20120522
2	ACTIVE      org.eclipse.jetty.util_8.1.3.v20120522
3	ACTIVE      org.eclipse.osgi.services_3.3.100.v20120522-1822
4	ACTIVE      org.eclipse.jetty.continuation_8.1.3.v20120522
5	ACTIVE      org.eclipse.jetty.server_8.1.3.v20120522
6	ACTIVE      org.eclipse.jetty.security_8.1.3.v20120522
7	ACTIVE      javax.servlet_3.0.0.v201112011016
8	ACTIVE      org.eclipse.jetty.http_8.1.3.v20120522
9	ACTIVE      org.example.equinox_1.0.0.qualifier
10	ACTIVE      org.eclipse.jetty.servlet_8.1.3.v20120522
12	ACTIVE      org.apache.felix.gogo.command_0.8.0.v201108120515
14	ACTIVE      org.apache.felix.gogo.runtime_0.8.0.v201108120515
16	ACTIVE      org.eclipse.equinox.console_1.0.0.v20120522-1841
17	ACTIVE      org.apache.felix.gogo.shell_0.8.0.v201110170705
18	ACTIVE      org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841
19	ACTIVE      org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841
20	RESOLVED    org.eclipse.equinox.transforms.hook_1.0.400.v20120522-2049
	            Master=0
21	RESOLVED    org.eclipse.equinox.weaving.hook_1.0.200.v20120524-1707
	            Master=0
22	RESOLVED    org.eclipse.equinox.servletbridge.extensionbundle_1.2.100.v20120522-2049
	            Master=0
osgi> 
Re: Jetty Hello World [message #987545 is a reply to message #987541] Tue, 27 November 2012 05:55 Go to previous messageGo to next message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
Hi again, I have attached a zip file containing the projects I am using. I had to remove the jars from the lib folder as it made the file too big. The jars are listed below. I included these in a target and have a launch config as well in the org.example.equinox project.

javax.servlet_3.0.0.v201112011016.jar
org.apache.felix.gogo.command_0.8.0.v201108120515.jar
org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar
org.apache.felix.gogo.shell_0.8.0.v201110170705.jar
org.eclipse.equinox.console_1.0.0.v20120522-1841.jar
org.eclipse.equinox.http.jetty_3.0.0.v20120522-1841.jar
org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar
org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
org.eclipse.equinox.servletbridge_1.2.200.v20120522-2049.jar
org.eclipse.equinox.transforms.hook_1.0.400.v20120522-2049.jar
org.eclipse.equinox.weaving.hook_1.0.200.v20120524-1707.jar
org.eclipse.jetty.continuation_8.1.3.v20120522.jar
org.eclipse.jetty.http_8.1.3.v20120522.jar
org.eclipse.jetty.io_8.1.3.v20120522.jar
org.eclipse.jetty.security_8.1.3.v20120522.jar
org.eclipse.jetty.server_8.1.3.v20120522.jar
org.eclipse.jetty.servlet_8.1.3.v20120522.jar
org.eclipse.jetty.util_8.1.3.v20120522.jar
org.eclipse.osgi.services_3.3.100.v20120522-1822.jar
org.eclipse.osgi_3.8.1.v20120830-144521.jar


Some of the online resources I have been trying include:

http://wiki.eclipse.org/Jetty/Tutorial/Jetty-OSGi_SDK#Setup_Jetty_and_a_first_Web-bundle

http://wiki.eclipse.org/Jetty/Feature/Jetty_OSGi#Jetty_bootstrapping_in_OSGi

Cheers
Eban
Re: Jetty Hello World [message #987768 is a reply to message #987541] Wed, 28 November 2012 04:01 Go to previous message
Eban Escott is currently offline Eban EscottFriend
Messages: 61
Registered: July 2009
Member
I was missing a VM arg:

-Dorg.osgi.service.http.port=8080

I also added a fragment to configure jetty and added another VM arg:

-Djetty.home.bundle=sandbox.jetty
Previous Topic:Why feature org.eclipse.equinox.core.sdk contains UI dependency ?
Next Topic:OSGi + Logback + slf4j - Eclipse Run Configuration
Goto Forum:
  


Current Time: Fri Apr 19 11:41:32 GMT 2024

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

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

Back to the top