I would like to manage requests. Exactly I want delay response for some requests by passing it to queue and next handle it using other thread. I’m using servlet’s filter. In doFilter method I don’t call filterChain’s doFilter and in spite of this the response is sent. In other thread I’m getting null when I call this method on filterChain from my queue.
What is wrong in these 2 issues (don’t send response immediately?
You are not supposed to do that. Request and Response object scope is valid only inside
Servlet's service()andFilter's doFilter()methods invoked as part of container dispatch.Note: You should be using Servlet 3.0 Asynchronous Request Processing through which request can be suspended and resumed.