Let me try to summarize the discussion.
1. There is a concern on whether FilterChain#doFilter can be called by a
thread other than the container invocation thread.
Similar question for RequestDispatcher#dispatch.
2. What is the return values of #getContextPath, #getServletPath,
#getPathInfo in case of async?
For (1),
From Servlet 3.1: A Filter and the target servlet or resource at the
end of the filter chain must execute in the same invocation thread.
This implicitly implies that FilterChain#doFilter should not be called
by a thread other than the container invocation thread.
We would like to make this more explicit in the spec by adding the
following in javadoc of FilterChain#doFilter
@throw IllegalStateException if it is invoked by a thread other
than the container invocation thread
Any comments?
Shing Wai Chan