WebModule interface

The WebModule interface allows modules to dynamically configure Filters, Servlets and ServletContextListeners. The @javax.annotation.Priority annotation is used to ensure that the request chain is sequenced correctly.

Table 1. WebModules (priority determines filter sequence, earliest first)
Web module @Priority listener? filter? servlet? Notes

WebModule
Shiro

FIRST + 100

Yes

/*

Either this or spring

WebModule
SpringSecurity

FIRST + 100

Yes

/*

Either this or shiro

WebModule
LogOnExceptionLogger

EARLY - 100

/wicket
/restful

Filter is passthru, with no side-effects.
Mapping depends on which viewers configured.

Although priority is relatively early, the filter is registered to be last in pipeline.

WebModule
Cors

EARLY

/wicket
/restful

Mapping depends on which viewers configured.

WebModule
TemplateResources

MIDPOINT - 100

*.thtml

*.thtml

WebModule
JaxrsResteasy4

MIDPOINT - 80

Yes

/restful

/restful

Filters mapped to servlet

WebModule
Wicket

MIDPOINT - 80

/wicket

WebModule
ServerSentEvents

MIDPOINT

/sse

servlet only, so priority doesn’t really matter.

WebModule
H2Console

MIDPOINT

/db/*

servlet only, so priority doesn’t really matter.