Your question, your audience. Choose who sees your identity—and your question—with question security.
To prepare the filter for service server calls init(FilterConfig) once, then calls doFilter().
The FilterConfig interface has methods for retrieving the filte name,init parameters, active servlet context.
The server calls destroy() to indicate that the filter is no longer in service.
Then filter can calls chain.doFilter() to shift control to the next filter.