MaintenanceFilter
The MaintenanceFilter allows displaying a maintenance page instead of the expected response from the back end. It is required that the maintenance page (hosted on a back end) contains two meta-tags defining the maintenance interval. The name of the meta-tags can be configured (see below). The content attribute of the meta-tag must contain a string defining a date. One of the following formats is supported:
- Sun, 06 Nov 1994 08:49:37 GMT
- Sunday, 06-Nov-94 08:49:37 GMT
- Sun Nov 06 08:49:37 1994
ch::nevis::isiweb4::filter::maintenance::MaintenanceFilter
libMaintenanceFilters.so.1
Configuration
MaintenanceServlet
Type: String
Usage Constraint: required
Syntax: <ServletName>:<uripath>
Defines the servlet that will return the maintenance page
<ServletName>: The name of the configured servlet which will be used to contact a back end hosting the maintenance page.<uripath>: URI used by the servlet to get the maintenance page.
::: info
If the configured MaintenanceServlet is a Http[s]ConnectorServlet, then the MappingType of the Http[s]ConnectorServlet has to be set to requesturi.
:::
UpdateInterval
Type: Integer
Unit: seconds
Usage Constraint: optional
Default: 600
Defines the update frequency of the maintenance page. As long as the system is in normal mode, it checks the MaintenanceServlet at the configured frequency. Once in maintenance mode, the system ignores the UpdateInterval parameter and calls the MaintenanceServlet on each request.
MetaTagStartName
Type: String
Usage Constraint: optional
Default: startTimestamp
The name of the meta-tag with the start-timestamp.
MetaTagEndName
Type: String
Usage Constraint: optional
Default: stopTimestamp
The name of the meta-tag with the end-timestamp.
AllowedContentTypes
Type: String
Usage Constraint: optional
Default: text/html
Defines which content types are allowed from a maintenance back end. The default regex type is PCRE(da).
Example
The filter in the sample code below enables the maintenance mode and specifies the servlet that provides data about the maintenance window.
<filter>
<filter-name>HttMaintenanceFilter</filter-name>
<filter-class>ch::nevis::isiweb4::filter::maintenance::MaintenanceFilter</filter-class>
<init-param>
<param-name>MaintenanceServlet</param-name>
<param-value>MaintenanceServlet:/maintenance/</param-value>
</init-param>
<init-param>
<param-name>UpdateInterval</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>MetaTagEndName</param-name>
<param-value>expires</param-value>
</init-param>
<init-param>
<param-name>MetaTagStartName</param-name>
<param-value>startTimestamp</param-value>
</init-param>
</filter>