Previous Topic

Next Topic

Book Contents

Book Index

System Properties

The deprecated OSGi HTTP Bundle uses the following system properties.

System Property

Type

Default Value

Description

javax.servlet.context.tempdir

String

<http_bundle_storage_area>/ servlettemp

On starting the HTTP bundle it creates a temporary directory in its persistent storage area where servlets will be stored.

mbs.cookies.nullvalues

boolean

false

Specifies if the getValue method, called on a cookie, should return null instead of an empty string for a cookie header containing no value.

mbs.cookies.encrypt

boolean

false

Turns on/off encrypting cookies.

mbs.http.buffersize

int

1024

Specifies the size of the output buffer.

mbs.http.cache

boolean

true

If this flag is true, every response to a client resource request includes the following headers:

  • Expires – the current date + one day i.e. expiration period becomes a day;
  • Cache-Control: max-age=86400, must-revalidate – the max-age amounts a day in seconds.
  • Last-Modified – shows the date the requested resource was last modified

The resource max age (and therefore the values of Expires and Cache-Control: max-age) can be adjusted by setting the mbs.http.cache.defaultExpires system property.

mbs.http.cache.defaultExpires

int

1440

The expiration period for resources, in minutes. The default value of 1440 minutes amounts to one day.

mbs.http.console

boolean

false

A flag that enables printing messages from the HTTP Bundle to the framework console.

mbs.http.debug

boolean

false

A flag that turns on/off printing of log debug messages of the HTTP Bundle.

When debug is enabled, client addresses are logged, which may cause some delay while servicing clients' requests because the invocation of socket.getInetAddress().toString() is a time consuming operation.

mbs.http.defaultServerName

String

default

Indicates the name registration property of the default HTTP Service.

mbs.http.registerManagedService

boolean

true

Registers a Managed Service with PID mbs.http.pid and two Managed Service Factories with FPIDs mbs.http.plain and mbs.https.secure. This property is used to speed up the initial framework startup by leaving the Config Bundle and the Metatype Bundle in lazy state.

mbs.measurements.full

boolean

false

If true, most of the bundles in the OSGi module generate debug information about their startup time.

mbs.measurements.bundles

boolean

false

If true, most of the bundles in the OSGi module generate debug information about their startup time.

mbs.http.encoding

String

ISO8859_1

Specifies the String id which is used by the VM for character encoding ISO8859_1.

mbs.http.flushtimeout

 

0

Valid values are long positive numbers. It defines the amount of milliseconds that must be waited before writing the next portion of bytes to the output stream. It is intended for balancing bad I/O communication with Palm OS.

mbs.http.nohostcheck

boolean

false

When switched on, client HTTP 1.1 requests are not checked for availability of the Host header.

mbs.http.onPlainServer

boolean

true

Controls the starting the HTTP server for plain connections.

mbs.http.request.buffersize

int

1024

Controls the buffer size in bytes when reading from an HTTP input stream. Useful when profiling.

mbs.http.timewatch

boolean

false

When true, prints the time, taken for the execution of the entire request-response operation sequence (from reading request headers to flushing the response) or of the Servlet.service() method.

mbs.useradmin.anonymousConnect

boolean

false

When set to true, this property switches off basic authentication by forcing the handleSecurity method of the default implementation of the HttpContext interface to return true. Turns on/off connecting to the framework with user-defined user name and password. It should be enabled when Simple Login service (found in the User Admin Bundle and in the User Admin Extension Bundle) is not available.

mbs.http.rootdir.disableList

boolean

false

If set to true, you will be able to retrieve resources from the root directory, but directory listing will not be allowed.

mbs.http.useServletFilters

boolean

true

If true, the support for servlet filters as defined in the Java Servlet Specification will be turned on – the Filters Manager service will be available in the OSGi framework.

mbs.http.stoptimeout

long

3000

The time (in milliseconds) for which a stopping HTTP server will wait for running HTTP requests to finish. After the timeout is exceeded all outstanding requests are shutdown forcefully.

Optional properties that take effect only if the Managed Services are turned off, i.e. when mbs.http.registerManagedService is set to false.

mbs.http.doNotChunkResources

boolean

false

When set to true, all requests for resources (not servlets) are answered with a non-chunked response, i.e. Transfer-Encoding: chunked header is not sent, instead the content-length of the entity body is calculated.

mbs.http.secondaryPort

int

8080

Indicates the secondary port for plain HTTP connection.

org.osgi.service.http.port

int

80

Indicates the primary port for plain HTTP connection.

Secure HTTP Connection

mbs.http.certificateCheck

String

0

Defines the way in which the servlet engine returns the client's certificate chain to ServletRequest users, when communicating over secure HTTP. Possible values are:

  • none: certificate chain is not added to request attributes
  • jdk12: certificates are returned as java.security.cert.X509Certificate instances as defined in Java Servlet Specification. They are added to the request attributes with key javax.servlet.request.X509Certificate and value - an Object array with elements of type java.security.cert.X509Certificate.

mbs.http.secureConnection

boolean

false

If true, the HTTP bundle registers one additional Managed Service Factory - HTTP Secure Server Configuration, with FPID mbs.https.secure. It holds the configuration for secure connection through HTTP.

mbs.https.needClientAuth

boolean

false

Set to true if client authentication is required.

org.osgi.service.http.port.secure

int

443

Determines the port for secure HTTP connection.

mbs.http.tlsprovider

String

0

Specifies the name of the SSL Context provider for establishing secure communication.

mbs.http.keyManagerFactoryProvider

String

0

Specifies the provider that implements a custom Key Manager Factory. No value will result in using the default key management provider in JSSE.

mbs.http.trustManagerFactoryAlgorithm

String

0

Specifies the algorithm that a custom Trust Manager Factory should support. No value will result in using the default trust management provider.

mbs.http.trustManagerFactoryProvider

String

0

Specifies the provider that implements a custom Trust Manager Factory. No value will result in using the default trust management provider.