Enterprise Manager - Context Configuration

Description

In BBj 17.0 and Higher, the Enterprise Manager allows the administrator to configure multiple contexts within the integrated Jetty Web Server. Each context configuration should resolve to a unique URL that can be a sub-URL from another context.

Jetty comes with several pre-configured contexts that provide minimal configurations and allow the deployment of applications and other content. The root context, for example, provides the default HTML context for your BBj Services and deployment for BUI, Web Start and other applications.

Accessing the Context Configuration

The Context Configuration screen displays all currently configured Web Contexts and can be accessed through the BBj EM Navigator by selecting Web and double-clicking Context Configuration as depicted in the following image:

After selecting a context, the properties are opened for editing:


Enabled

Denotes if the context is enabled.

Name

The HTTP Port number.

Document Base

Location of the documents (HTML files) and other resources (stylesheets and javascript files) being deployed.

Path

Path element of the URL (the portion appearing after the port number).

WAR File

Location of WAR file (if any).

Config.bbx

The config.bbx to use when executing BBj programs.

Encoding

The encoding for the context.

SSCP

The Session-Specific Classpath to use.

Context-specific control programs can be configured by expanding the Start-Stop Programs section to reveal the additional fields. These programs are executed accordingly:

To override the default mapping for applications deployed within the context, expand the Override Mappings section and complete the fields as follows:

In addition to the programmatic approach to deploying servlets, servlets can be added to the preconfigured servlet list for each context.

This causes the servlet to be configured when the Jetty Server, or more specifically the context, is started and removes the need for a deployer program as described in the BBj Servlet Overview documentation. A popup will be displayed for editing the servlet configuration:

Hostnames and Welcome Files

The hostname(s) that the context will respond to can be configured.

Welcome files specify the default resource within the requested path, such as index.html.

 

Session Cookie

Under the Session Cookie section, the HTTP Session Cookie (JSESSIONID by default) may be configured using the checkboxes shown below.

HttpOnly

Marks the session cookie with the HttpOnly attribute. Cookies with this attribute are only sent to the server, and cannot be accessed by client-side scripts.

Secure

Marks the session cookie with the Secure attribute. Cookies with this attribute are only sent over the secure HTTPS protocol.

User cookies are not affected by either of these flags. If a servlet adds a cookie it is the responsibility of the developer to call BBjCookie::setHttpOnly(boolean) or BBjCookie::setSecure(boolean) depending on the specific application requirements.



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.