Configuring a Custom Undertow Filter in WildFly: Difference between revisions
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
<pre> | <pre> | ||
... | |||
<subsystem xmlns="urn:jboss:domain:undertow:3.0"> | |||
... | |||
<filters> | |||
... | |||
<filter name="response-time" | |||
class="com.novaordis.playground.wildfly.undertow.customfilter.ResponseTime" | |||
module="com.novaordis.playground.wildfly.undertow.customfilter"/> | |||
</filters> | |||
</subsystem> | |||
... | |||
</pre> | </pre> |
Revision as of 09:10, 19 January 2016
Internal
Example
Overview
In order to install a custom filter in WildFly Undertow instance, you will need to wrap the filter class in a WildFly module, deploy the module and configure the Undertow subsystem to use the custom filter.
Write the Filter Class
Create and Deploy a WildFly Module
In order to be made available to the Undertow subsystem, the custom filter code must be deployed as a WildFly Module. For more details on how to build and deploy a custom module, see:
Configure the Undertow Subsystem
Declare the Filter in the <filters> Section
... <subsystem xmlns="urn:jboss:domain:undertow:3.0"> ... <filters> ... <filter name="response-time" class="com.novaordis.playground.wildfly.undertow.customfilter.ResponseTime" module="com.novaordis.playground.wildfly.undertow.customfilter"/> </filters> </subsystem> ...