Re: [jetty-dev] Using Jetty as an OSGi bundle

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] Using Jetty as an OSGi bundle

Jim Rayburn
I am attempting to use Jetty as a bundle in an OSGi framework. I am a few weeks new with OSGi so I will provide what I understand to the best of my knowledge...

My original project has a few OSGi bundles. I figured to start with something small. I am defining only a single class file REST application.

My environment is Eclipse Oxygen, using Java 1.8, and OSGi R6. I am using BndTools plugin for Eclipse. My project is built using the enroute templates. For this project I used the application template.

I placed my existing code in the following repo. I believe the issue is not understanding Jetty to the depth of being able to configure it correctly.


I am referencing the guide at  https://www.eclipse.org/jetty/documentation/9.4.x/framework-jetty-osgi.html for steps needed to configure Jetty.

I have added the Jetty OSGi bundles defined in Getting Started. I have added annotations defined in the associated link. 

On customizing the Jetty container, I attempted to set the jetty.http.port. This doesn't work so I would expect. I select the Run As -> Run Configuration -> Environment tab. I define the -Djetty.http.port=8123. The port is still being defined to use port 8080.

When I attempt to access the REST methods, I am receiving a 403 when I go to the path that I defined in the Example.java class file.

Thank you for your help on what I believe is a simple matter.

Cheers,
Jim


_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev