PingDirectory

Configuring HTTP Servlet Extensions

You must first configure one or more servlet extensions to use the HTTP connection handler.

Servlet extensions are responsible for obtaining Java servlets, using the Java Servlet 3.0 specification as described in JSR 315, and registering them to be invoked using one or more context paths. If you plan to deploy the System for Cross-domain Identity Management (SCIM) extension, follow the instructions in Managing the SCIM 2.0 servlet extension. For custom servlet extensions created using the Server SDK, the process varies based on whether you are using a Java-based or Groovy-scripted extension.

Configuring web application servlet extensions

About this task

A web application can be deployed either as a WAR file that has been packaged according to the standard layout and containing a web.xml deployment descriptor, or from a directory containing the application’s source components arranged in the standard layout.

Steps

  • When deploying a web application from a directory, specify the location of the web.xml deployment descriptor if it is not in the standard location.

  • Specify the directory used by the server for temporary files.

Result

At runtime, the web application has access to the server classes.

Configuring Java-based servlet extensions

About this task

For Java-based extensions, first use the Server SDK to create and build the extension bundle as described in the Server SDK documentation.

Steps

  • Use the manage-extension tool to install it.

    Example:

    $ bin/manage-extension --install/path/to/extension.zip

    The Java-based extension can then be configured for use in the server using dsconfig or the Administrative Console. Create a new Third Party HTTP Servlet Extension, specifying the fully-qualified name for the HTTPServletExtension subclass in the extension-class property, and providing any appropriate arguments in the extension-argument property.

    Web application and Servlet extensions run in a shared embedded web application server environment. Incompatibilities or conflicts might arise from use of different versions of commonly used JARs or including frameworks such as loggers, Spring components, JAX-RS implementations or other resources that might require a dedicated Java virtual machine (JVM) environment. After introducing a custom extension, check the server error log for an indication that the extension loaded successfully. The error log might also contain debug information if the extension failed to load with an initialization exception or did not complete initialization.

Configuring Groovy-scripted extensions

Steps

  1. For Groovy-scripted extensions, place the necessary Groovy scripts in the appropriate directory based on the package for those scripts after the lib/groovy-scripted-extensions directory.

  2. Create a new Groovy Scripted HTTP Servlet extension, specifying the fully-qualified Groovy class name for the script-class property, and providing any appropriate arguments in the script-argument property.