Note: this component has a complexity level of "expert", which means that objects of this type are not expected to be created or altered. Please contact support for assistance if you believe that you have a need to create or modify this type of object.
The Velocity HTTP Servlet Extension may be used to present pages over HTTP rendered using the Apache Velocity template system.
Velocity templates are obtained from the filesystem via a loader instance which is selected for each request based on the request's Accept header and whether or not the loader has access to a resource that can fulfill the requested page.
Before a template is used to render content, a context is created containing content that can be referred to in templates via the Velocity variable syntax. You can expose a number of built-in context objects such as the HTTP response, request or session attributes using the properties of this Velocity HTTP Servlet Extension. You can also specify custom objects by creating Velocity Context Objects.
In addition to template-generated content, the Velocity HTTP Servlet Extension can be used to serve static content such as images, CSS and Javascript files.
The Velocity HTTP Servlet Extension component inherits from the HTTP Servlet Extension
The following components have a direct composition relation from Velocity HTTP Servlet Extensions:
The following components have a direct aggregation relation from Velocity HTTP Servlet Extensions:
The properties supported by this managed object are as follows:
Description | A description for this HTTP Servlet Extension |
Default Value | None |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | The cross-origin request policy to use for the HTTP Servlet Extension. A cross-origin policy is a group of attributes defining the level of cross-origin request supported by the HTTP Servlet Extension. |
Default Value | No cross-origin policy is defined and no CORS headers are recognized or returned. |
Allowed Values | The DN of any HTTP Servlet Cross Origin Policy. |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies HTTP header fields and values added to response headers for all template page requests. The values specified here may be overridden by a context provider that is configured to contribute content for a given request. Values specified here must specify both the header field name and the value in conformance with RFC 2616. Fields may only be specified once; multiple values for the same header should be comma-separated. See RFC 7231 for a standard set of field names. |
Default Value | None |
Allowed Values | Colon-separated header field name and value |
Multi-Valued | Yes |
Required | No |
Admin Action Required | None. Modification requires no further action |
correlation-id-response-header
Description | Specifies the name of the HTTP response header that will contain a correlation ID value. Example values are "Correlation-Id", "X-Amzn-Trace-Id", and "X-Request-Id". This property can be used to specify a custom response header name for correlation IDs. The value specified here will override the correlation-id-response-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension. If the use-correlation-id-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension is not enabled, then this property will be ignored. |
Default Value | The correlation-id-response-header property of the HTTP Connection Handler hosting this HTTP Servlet Extension will be used. |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | The context path to use to access all template-based and static content. The value must start with a forward slash and must represent a valid HTTP context path. |
Default Value | /view |
Allowed Values | The value must start with a forward slash and must represent a valid HTTP context path. |
Multi-Valued | No |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | The path below the base context path by which static, non-template content such as images, CSS, and Javascript files are accessible. |
Default Value | statics |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the base directory in which static, non-template content such as images, CSS, and Javascript files are stored on the filesystem. |
Default Value | config/velocity/system/statics |
Allowed Values | A filesystem path |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the base directory in which custom static, non-template content such as images, CSS, and Javascript files are stored on the filesystem. Files in this directory will override those with the same name in the directory specified by the static-content-directory property. |
Default Value | config/velocity/custom/statics |
Allowed Values | A filesystem path |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies an ordered list of directories in which to search for the template files. This setting serves as the default for templates but can be overridden per loader instance by setting the corresponding template-directory property of the Velocity Template Loader instance. Any template that is included in another template using the #parse directive must have its directory specified here regardless of the setting defined for the Velocity Template's template-directory property. |
Default Value | velocity/templates config/velocity/templates |
Allowed Values | A filesystem path |
Multi-Valued | Yes |
Required | Yes |
Admin Action Required | None. Modification requires no further action |
Description | Specifies whether the HTTP request will be exposed to templates. If true the HTTP request will be included in the context as accessible via the 'ubid_request' attribute. |
Default Value | true |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies whether the HTTP session will be exposed to templates. If true and the HTTP session exists for the current request, it will be included in the context as accessible via the 'ubid_session' attribute. |
Default Value | true |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies whether a server context will be exposed under context key 'ubid_server' for all template contexts. Refer to the server SDK's API documentation for the com.unboundid.directory.sdk.common.types.ServerContext class for more information about the properties and methods made available by the server context. |
Default Value | true |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Indicates whether context providers may override existing context objects with new values. If 'true' context providers may set the value of any non-protected context key, possibly overriding a value previously set by a provider. If 'false' an attempt made to override a context value will cause a runtime exception. |
Default Value | false |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the path to a file that contains MIME type mappings that will be used to determine the appropriate value to return for the Content-Type header based on the extension of the requested static content file. If a MIME types file is specified, then it may take one of two forms: it may either use the de-facto standard form in which the MIME type is followed by one or more spaces or tabs, which are then followed by a list of space and/or tab-delimited file extensions (e.g., "text/html html htm" indicates that any file with an extension of "html" or "htm" should have a Content-Type value of "text/html"), or it may use a Java properties file format in which an extension should be followed by an equal sign and the MIME type for that extension (e.g., "html=text/html" indicates that a Content-Type value of "text/html" should be used for files with an extension of "html". Note that even if the properties file format is used, line wrapping is not supported so each definition must be given on one line. |
Default Value | A default set of MIME type definitions will be used. |
Allowed Values | A filesystem path |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the default value that will be used in the response's Content-Type header that indicates the type of content to return. This property may be overridden per template loader by setting the corresponding mime-type property of the Velocity Template Loader objects. Common media types are 'text/html', 'application/xml', and 'application/json'. |
Default Value | text/html |
Allowed Values | The value must represent a valid Internet media type consisting of a type, subtype and optional parameters. |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies HTTP header fields and values added to response headers for static content requests such as images and scripts. Values specified here must specify both the header field name and the value in conformance with RFC 2616. Fields may only be specified once; multiple values for the same header should be comma-separated. See RFC 7231 for a standard set of field names. |
Default Value | None |
Allowed Values | Colon-separated header field name and value |
Multi-Valued | Yes |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Require authentication when accessing Velocity templates. The Directory Server includes a Velocity template system that may contain content you want to protect with authentication. If Velocity templates are configured to require authentication, then a users backend must be populated to provide bind credentials. You can also configure an identity mapper to help map credentials to user entries and attributes. |
Default Value | false |
Allowed Values | true false |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
Description | Specifies the name of the identity mapper that is to be used for associating basic authentication credentials with user entries. |
Default Value | Requests must specify a fully-qualified DN. No attempt will be made to map a user name to a DN. |
Allowed Values | The DN of any Identity Mapper. |
Multi-Valued | No |
Required | No |
Admin Action Required | For this modification to take effect, you must either restart the server or disable then re-enable all HTTP Connection Handlers referencing this component. |
character-encoding (Advanced Property)
Description | Specifies the value that will be used for all responses' Content-Type headers' charset parameter that indicates the character encoding of the document. Common charset parameters are 'UTF-8' and 'ISO-8859-1'. |
Default Value | UTF-8 |
Allowed Values | A string |
Multi-Valued | No |
Required | No |
Admin Action Required | None. Modification requires no further action |
To list the configured HTTP Servlet Extensions:
dsconfig list-http-servlet-extensions [--property {propertyName}] ...
To view the configuration for an existing HTTP Servlet Extension:
dsconfig get-http-servlet-extension-prop --extension-name {name} [--tab-delimited] [--script-friendly] [--property {propertyName}] ...
To update the configuration for an existing HTTP Servlet Extension:
dsconfig set-http-servlet-extension-prop --extension-name {name} (--set|--add|--remove) {propertyName}:{propertyValue} [(--set|--add|--remove) {propertyName}:{propertyValue}] ...