Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Installing extended Http Service in Apache Karaf


Usually, just using the basic Http Service is not enough anymore these days, especially when it comes to serving JSP or complete web applications. So, a better usable container is needed.

How to do it…

  1. To install the HTTP Whiteboard feature, start your Apache Karaf server and install the HTTP Whiteboard feature via the console using the following command:

    karaf@root()> feature:install http-whiteboard
    
  2. Transform your Apache Karaf server into a full-featured web container using the following command:

    karaf@root()> feature:install war
    

How it works…

The Whiteboard feature installs another two Pax Web bundles. These bundles give you JSP and Whiteboard support. These two bundles are shown in the following command-line output:

97 | Active   |  30 | 3.1.0       | OPS4J Pax Web - Jsp Support
98 | Active   |  30 | 3.1.0       | OPS4J Pax Web - Extender - Whiteboard

This enables Pax Web to deploy and serve JSPs registered to the now available WebContainer...