This filter is meant to be installed in the middle of a pipeline created by
org.. The
passed request's servlet path is updated to be all text up to the start of
the designated capture group, and the path info is changed to the contents of
the capture group.
| Modifier and Type | Field and Description |
|---|---|
| private final int |
| Access | Constructor and Description |
|---|---|
| public | RegexGroupFilter(int
capture group number, 1 through the number of groups. groupIdx)Constructor for RegexGroupFilter |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy()
Overrides default jakarta. Called by the web container to indicate to a filter that it is being taken out of service. |
| public void | doFilter(final ServletRequest
the request, final ServletResponse ServletRequest object contains the client's requestthe rsp, final FilterChain ServletResponse object contains the filter's responsethe chain)FilterChain for invoking the next filter or the resourceImplements jakarta. The |
| private static WrappedRequest[] | |
| public void | init(FilterConfig
a config)FilterConfig object containing the filter's configuration and initialization
parametersOverrides default jakarta. Called by the web container to indicate to a filter that it is being placed into service. |
| groupIdx | back to summary |
|---|---|
| private final int groupIdx | |
| RegexGroupFilter | back to summary |
|---|---|
| public RegexGroupFilter(int groupIdx) Constructor for RegexGroupFilter
| |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter. This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
| |
| doFilter | back to summary |
|---|---|
| public void doFilter(final ServletRequest request, final ServletResponse rsp, final FilterChain chain) throws IOException, ServletException Implements jakarta. Doc from jakarta. The A typical implementation of this method would follow the following pattern:
| |
| groupsFor | back to summary |
|---|---|
| private static WrappedRequest[] groupsFor(ServletRequest r) | |
| init | back to summary |
|---|---|
| public void init(FilterConfig config) throws ServletException Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being placed into service.
The servlet container calls the init method exactly once after instantiating the filter. The init method must
complete successfully before the filter is asked to do any filtering work. The container will ensure that actions
performed in the The web container cannot place the filter into service if the init method either
| |