An OSGi Declarative Services (DS) component that starts and registers a servlet as a service. The servlet returns a simple "Hello world" style HTML page.

Steinar Bang 8cd0339751 Use karaf 4.4.4 5 months ago
.github ef892fbdf1 Replace java 11 with java 17 in github actions CI build 9 months ago
src a544943ac7 Load scr ("Service Component Runtime" aka "Declarative Services") at runtim 9 months ago
.editorconfig ccdc87fffa Initial commit. 6 years ago
.gitignore ccdc87fffa Initial commit. 6 years ago
LICENSE ccdc87fffa Initial commit. 6 years ago
README.org a24f324925 Replace travis-ci CI build with github actions CI build 1 year ago
pom.xml 8cd0339751 Use karaf 4.4.4 5 months ago

README.org

A simple Pax Web Whiteboard Extender Application

This is a minimal "Hello world" application that will plug into the Pax Web Whiteboard Extender with the local path "/hello" where it returns an HTML page.

Status

file:https://github.com/steinarb/hello-karaf-demo/actions/workflows/hello-karaf-demo-maven-ci-build.yml/badge.svg file:https://coveralls.io/repos/github/steinarb/hello-karaf-demo/badge.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=alert_status#.svg file:https://maven-badges.herokuapp.com/maven-central/no.priv.bang.demos/hello-karaf-demo/badge.svg

file:https://sonarcloud.io/images/project_badges/sonarcloud-white.svg

How to install

file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=sqale_index#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=coverage#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=ncloc#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=code_smells#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=sqale_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=security_rating#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=bugs#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=vulnerabilities#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=duplicated_lines_density#.svg file:https://sonarcloud.io/api/project_badges/measure?project=steinarb_hello-karaf-demo&metric=reliability_rating#.svg

    This is how to build and install the servlet:
  1. First download and install apache karaf
  2. In the apache karaf command line, install the feature that pulls in the servlet with dependencies
  3. #+BEGIN_EXAMPLE feature:repo-add mvn:no.priv.bang.demos/hello-karaf-demo/LATEST/xml/features feature:install hello-karaf #+END_EXAMPLE
  4. After this, the servlet will be listening for GET requests, at the local path "/hello" on the karaf web server, e.g. http://localhost:8181/hello for a karaf server started locally, with default settings

To uninstall the servlet from karaf

    This is how to uninstall the servlet from karaf:
  1. At the karaf console prompt, give the following command:
  2. #+BEGIN_EXAMPLE feature:uninstall hello-karaf-demo #+END_EXAMPLE

This will disconnect the servlet from the Pax Web Whiteboard Extender and uninstall the servlet, and all dependencies (e.g. Pax Web) that has been pulled in by this feature.

However, if a different feature has pulled in the same dependencies, the dependencies won't be uninstalled until everything that has required them is uninstalled.

License

This software project is licensed under Apache License v. 2.

See the LICENSE file for details.