Is there any possibility(or trick) to achieve this goal?
In fact, it doesn't make sense to force the container thread to wait, it is against the initial goal. I am just curious if it is possible.
At any rate, I know nothing about the async support in Servlet 3.0, but Asynchronous Support in Servlet 3.0 seems to say something about your question, I think.
German Gonzalez-Morris wrote:Filters are under HTTP Request/Response paradigm, then it cannot be Asynchronous.
Maybe what you need it is to do a Ajax call in someway if asynchronous is required otherwise Filter will keep waiting for an answer.
@German, this confirms my expectations. I don't need it for something specific, I just wanted to check if I am not misunderstanding the concept.
@Paul, thanks for the link. The available information about asynchronous processing in Servlets is sparse and insufficient(in my opinion). The only source is Servlet 3.0 specification and few articles on the net.