Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Excerpt

...

hidden

...

width80%
true

OSGi R4 Http Service and Web Container (RFC66) implementation using Jetty

...

This example deploys a configuration admin service and fileinstall for controlling the configuration of Pax Web.
Using fileinstall you will be able to change a configuration file (properties file) and see the web server reconfiguring itself.
TODO - explain how to run it.

...

width20%

...

Extensions

...

8.

System Requirements

  1. Java5 virtual machine running on a supported operating system.
  2. An OSGi framework compliant with the R4 Core specification.
  3. Pax Logging Service.
  4. (Optional) A Config Admin Service that is R4 compliant. (see configuration section for details)

Installation

Manual installation

Pax Runner installation

  • Add the following dependency to your pax runner pom:
    Code Block
    
    <dependency>
      <groupId>org.ops4j.pax.web.bundles</groupId>
      <artifactId>service</artifactId>
      <version>0.2.0</version>
    </dependency>
    
  • Ensure that you have the following repository:
    Code Block
    
    <repository>
      <id>ops4j-repository</id>
      <url>http://repository.ops4j.org/maven2</url>
    </repository>
    
  • Start pax runner
  • ! you must have a logging framework installed

Pax Construct

  • Create a project using pax-create-project (if you do not already have one)
  • Ensure that you have the following repository:
    Code Block
    
    <repository>
      <id>ops4j-repository</id>
      <url>http://repository.ops4j.org/maven2</url>
    </repository>
    
  • Import pax web bundle using pax-import-bundle -g org.ops4j.pax.web.bundles -a service -v 0.2.0
  • Start pax-provision
  • ! you must have a logging framework installed

...

Building

The source code can be build using Maven 2 ( >= 2.0.6, not tested for maven < 2.0.6 )

Building the service

  • Checkout the source code
  • Go to the root of the downloaded project and run the following:
    Code Block
    
    mvn clean install 
    

Building the samples

  • Checkout the source code
  • Go to the root of the downloaded project and run the following:
    Code Block
    
    mvn clean install 
    

Source code

You must have a valid ops4j account in order to be able to checkout code from the source code repository.

...

Service source code

You can download the source code from: https://scm.ops4j.org/repos/ops4j/projects/pax/web
You can browse the source code using FishEye at http://scm.ops4j.org/browse/OPS4J/projects/pax/web.

...

Samples source code

You can download the source code from: https://scm.ops4j.org/repos/ops4j/projects/pax/web-samples
You can browse the source code using FishEye at http://scm.ops4j.org/browse/OPS4J/projects/pax/web-samples.

Issue tracker

The issue tracker is to be found at http://issues.ops4j.org/jira/browse/PAXWEB.
Here are the current open issues:

Jira Issues
columnssummary
urlhttp://issues.ops4j.org/jira/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?&pid=10110&status=1&sorter/field=issuekey&sorter/order=DESC&tempMax=1000

Configuration

Pax Web supports different configuration options as follows. The default configuration setup will first look for configuration admin, then for environment properties and last for default values. Note that this sequesnce is followed for each configuration property.

Configuration via OSGi environment properties

In order to configure Pax Web via OSGi environment properties set the following properties:

  • org.osgi.service.http.port - This property specifies the port used for servlets and resources accessible via HTTP. The default value for this property is 8080.
  • org.osgi.service.http.port.secure - This property specifies the port used for servlets and resources accessible via HTTPS. The default value for this property is 443.

Configuration via OSGi Configuration Admin Service

Pax Web can be configued via Configuration Admin Service (if available). The PID used for configuration is org.osgi.service.http.HttpService.
It supports the following properties:

  • org.osgi.service.http.port - This property specifies the port used for servlets and resources accessible via HTTP.
  • org.osgi.service.http.port.secure - This property specifies the port used for servlets and resources accessible via HTTPS.
  • org.osgi.service.http.enabled - This property specifies if the HTTP is enabled.
  • org.osgi.service.http.secure.enabled - This property specifies if the HTTPS is enabled.

Configuration via exposed HttpServiceConfigurer

TODO

Examples

Department Store

The Pax Wicket Department Store example running using Pax Web
TODO - explain how to run it.

Simple configurer

The example exposes a configuration page that can be used to configure Pax Web via the HttpServiceConfigurer.
TODO - explain how to run it.

Using Configuration Admin from Felix and FileInstall from Peter Kriens


Section


Column

Image Added
OSGi R4 Http Service and Web Applications (OSGi Enterprise Release chapter 128) implementation using Jetty 8.

Insert excerpt
Http Service Extensions
Http Service Extensions
nopaneltrue

Pax Web facilitates an easy installation of WAR bundles as well as discovery of web elements published as OSGi services. All of this beside the, standard, programmatic registration as detailed in the HTTP Service specs.

Right now following Technologies are supported by Pax Web:

Pax Web 7.x:

  • Servlet 3.1.0
  • JSP 2.3.1
  • JSF 2.2.12
  • Jetty 9.4.x
  • Tomcat 8.x
  • support of CDI (through Pax-CDI)
  • Web-Fragments

Pax Web 4.x:

  • Servlet 3.0
  • JSP 2.0
  • JSF 2.1
  • Jetty 9.0.x
  • Tomcat 7.x (still experimental, but better supported)
  • support of CDI (through Pax-CDI)
  • support of only Servlet 3.0 annotated Servlets in JAR
  • Web-Fragments

Pax Web 3.x:

  • Servlet 3.0
  • JSP 1.1.2
  • JSF 2.1
  • Jetty 8.x
  • Tomcat 7.x (still experimental)
  • support of CDI (through Pax-CDI)
  • support of only Servlet 3.0 annotated Servlets in JAR

Pax Web 2.x:

  • Servlet 3.0
  • JSP 1.1.2
  • JSF 2.1
  • Jetty 8.x
  • support of application binding to a virtual host (Http-Connector) for WABs

Pax Web 1.x:

  • Servlet 2.5
  • JSP 1.1.2
  • JSF 1.2
  • Jetty 7.x




Section


Column

Latest News