Usages


This is a new feature in Joget DX 8.2.

A plugin that acts as a web filter, and intercepts the HTTP request, while doing some pre-processing & post-processing to the response.

Common use cases:

Interface Class

org.joget.plugin.base.PluginWebFilter

Interface Methods

getName()

String getName()

Method returning the name of the filter.

getUrlPatterns()

String[] getUrlPatterns()

isPositionAfterSecurityFilter()

boolean isPositionAfterSecurityFilter()

A flag to make the filter execute after the security chain. If after that, you can get the logged-in user.

getOrder()

int getOrder()

The order of plugin web filter execution.

doFilter(ServletRequest request, ServletResponse response, FilterChain chain)

void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)

The filter logic implementation.

Abstract Class

org.joget.apps.app.model.PluginWebFilterAbstract

Abstract Methods

afterRegister()

void afterRegister()

Auto calling PluginWebFilterUtil.registerFilter to register the filter when installed.

beforeUnregister()

void beforeUnregister()

Auto calling PluginWebFilterUtil.unregisterFilter to unregister the filter when uninstalling.

isPositionAfterSecurityFilter()

boolean isPositionAfterSecurityFilter()

Default to return true.

getOrder()

int getOrder()

Default to return 0.

Sample Plugins