# HelloWorld OSGi Example

This example demonstrates how to develop a simple OSGi WAR bundle containing a RESTful hello world web service

## Contents

The example WAR (see the `war-bundle` module) consists of two Jersey resources:

`com.sun.jersey.samples.helloworld.HelloWorldResource`
  that produces a textual response to an HTTP GET

`com.sun.jersey.samples.helloworld.AnotherResource`
  that produces a different textual response to an HTTP GET. The purpose of this resource is to show how to define multiple web resources within a web application.

The mapping of the URI path space is presented in the following table:

URI path | Resource class | HTTP methods
--- | --- | ---
/helloworld | HelloWorldResource | GET
/another | AnotherResource | GET

## Running the Example

To run the example, you would need to build the WAR file and install it to an OSGi runtime (e.g. Apache Felix) together with other OSGi modules. Look at the attached `functional-test` module for details on the programatical runtime configuration. To build the war archive and run the tests, you can just launch

    %mvn clean install