Servlet filters provide a powerful mechanism to intercept queries and do wise things such as profiling, monitoring, content generation, and so on. It works exactly like any normal Java servlet filter and JIRA provides the Servlet Filter Plugin Module to add them using plugins. In this recipe, we will learn about how to use filter to intercept certain queries to JIRA and how we can utilize them!
As with other servlet plugin modules, a servlet-filter
plugin
module also has a unique key
and a class
associated with it. The name
attribute holds the human-readable name of the filter and weight
indicates the order in which the filter will be placed in the filter chain. The higher the weight, the lower the filter's position.
There is another important attribute location
that denotes the position of the filter in the application's filter chain. Following are the four possible values for the location:
after-encoding
: Very top of the filter chain in the application...