Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
APACHE KARAF COOKBOOK

You're reading from   APACHE KARAF COOKBOOK Over 60 recipes to help you get the most out of your Apache Karaf deployments

Arrow left icon
Product type Paperback
Published in Aug 2014
Publisher
ISBN-13 9781783985081
Length 260 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Apache Karaf for System Builders FREE CHAPTER 2. Making Smart Routers with Apache Camel 3. Deploying a Message Broker with Apache ActiveMQ 4. Hosting a Web Server with Pax Web 5. Hosting Web Services with Apache CXF 6. Distributing a Clustered Container with Apache Karaf Cellar 7. Providing a Persistence Layer with Apache Aries and OpenJPA 8. Providing a Big Data Integration Layer with Apache Cassandra 9. Providing a Big Data Integration Layer with Apache Hadoop 10. Testing Apache Karaf with Pax Exam Index

Configuring Pax Web modules deployed in Apache Karaf


Pax Web uses Jetty as the underlying web container. The OSGi Http Service specification defines a set of parameters for configuration of the Http Service. In addition to these standard configuration parameters, the Pax Web-specific parameters are configurable. On top of those configuration parameters, it's also possible to configure Jetty itself for further needs.

How to do it…

The configuration of the Http Service is done through the Configuration Admin service. During the installation of the Http Service, the configuration is also set for the service PID org.ops4j.pax.web, as shown in the following code snippet:

javax.servlet.context.tempdir = ${karaf.data}/pax-web-jsp
org.ops4j.pax.web.config.file = ${karaf.home}/etc/jetty.xml
org.osgi.service.http.port = 8181

How it works…

This basic set of configuration defines the HTTP port the Jetty server is listening to, the servlet temp directory to create JSP servlet files, and the location of the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime