Your stack trace compared to the selected pattern
Each filter implements the
javax.servlet.Filter interface, which includes a
doFilter() method that takes as input a request and response pair along with a filter chain, which is an instance of a class (provided by the servlet container) that implements the
javax.servlet.FilterChain interface. The filter chain reflects the order of the filters. The servlet container, based on the configuration order in the web.xml file, constructs the chain of filters for any servlet or another resource that has filters mapped to it.
For each filter in the chain, the filter chain object passed to it represents the remaining filters to be called, in order, followed by the target servlet.
When the target servlet is finished, the chain
doFilter() call in the filter returns, and the filter can do any postprocessing.
Any uncaught exception occurred in the servlet is thrown to filter which cause the following error:
ApplicationFilterChain.doFilter() has thrown a ServletException
To solve it, check stack trace to see which servlet throws the exception and try to resolve that exception.