The doFilter method from the javax.servlet.Filter interface accepts a ServletRequest and a ServletResponse as seen below:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
My question is: Is it safe to assume that an instance of HttpServletRequest and HttpServletResponse will always be passed in as the request and response parameters? The Javadocs do not seem to mention anything of the kind. Thanks.