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
Classname
ch::nevis::isiweb4::filter::maintenance::MaintenanceFilter
Library
libMaintenanceFilters.so.1
Configuration
Name | Type, Usage Constraints, Defaults | Description |
---|---|---|
MaintenanceServlet | string: <ServletName>:<uripath> ; required | Defines the servlet that will return the maintenance page. This entry has the following syntax: *<ServletName>:<uripath> : - <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. |
UpdateInterval | integer [sec]; 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 | String optional default: startTimestamp | The name of the meta-tag with the start-timestamp. |
MetaTagEndName | String optional default: stopTimestamp | The name of the meta-tag with the end-timestamp. |
AllowedContentType | string; optional; default: text/html | Defines which content types are allowed from a maintenance back end. The default regex type is "PCRE(da)". |
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>