Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Tutorial/Jetty-OSGi SDK"

Line 14: Line 14:
 
=== First web-application defined in an OSGi bundle ===
 
=== First web-application defined in an OSGi bundle ===
  
 +
[[Image:Jetty-sdk-01-create-plugin-project.png|thumb|Create a new OSGi Project]]
 +
[[Image:Jetty-sdk-02-name-plugin-project.png|thumb|OSGi Project name]]
 +
[[Image:Jetty-sdk-03-set-plugin-project.png|thumb|OSGi Project parameters]]
 +
[[Image:Jetty-sdk-04-b-use-rfc66-template.png|thumb|OSGi Project RFC66 template]]
 +
[[Image:Jetty-sdk-05-webapp-project.png|thumb|Web-application parameters]]
  
 
=== Launch configuration ===
 
=== Launch configuration ===
 +
 +
[[Image:Jetty-sdk-06-run-webapp.png|thumb|Right-click and choose run as...]]
  
 
The configuration of the application server, jetty is done via the usual configuration files: ${jetty.home}/etc/jetty.xml and others. (Need to insert a link for that).
 
The configuration of the application server, jetty is done via the usual configuration files: ${jetty.home}/etc/jetty.xml and others. (Need to insert a link for that).

Revision as of 00:01, 29 November 2009



Introduction

Jetty-OSGi SDK goal extends the Plugin Development Environment (PDE) to the development and debugging of web-applications.

The "Jetty" launch configuration prepares the execution of jetty-osgi and deploys web-applications on it. The web-applications are either defined as pure java projects or as OSGi bundles. The SDK also provides a couple of project templates suitable to create web-applications embedded inside an OSGi bundle.

Installation

The build of the SDK is not yet done in eclipse.

Download eclipse-3.6M3 or more recent. Download the latest jetty-SDK-runtime and jetty-SDK-sources

Unzip those inside the dropins folder of your eclipse-3.6M3 installation.

First web-application defined in an OSGi bundle

Create a new OSGi Project
OSGi Project name
OSGi Project parameters
OSGi Project RFC66 template
Web-application parameters

Launch configuration

Right-click and choose run as...

The configuration of the application server, jetty is done via the usual configuration files: ${jetty.home}/etc/jetty.xml and others. (Need to insert a link for that). By default jetty is launched on port 8080 for http and port 8443 for https. The "central logging" is enabled by default: all logging is configured via ${jetty.home}/resources/logback.xml (or log4j.properties)

Debugging web-applications defined in standard java projects

Developing Jetty-OSGi in PDE

Use the jetty-sdk setup; identical to the one used for the development of web-applications. Import as project the bundles to work on: [1]

Start hacking using the PDE just like any other OSGi bundle or eclipse plugin. Launch using the jetty configuration. The PDE will use the bundles as defined in the workspace as a replacement for the jetty bundles

Additional Resources

Jetty-OSGi, RFC66, PDE We are working on migrating all building an update site and executing the build on eclipse with the rest of the jetty@eclipse project. In the mean time, the latest code is here: [http://github.com/intalio/hightide-on-osgi

Back to the top