I am running the code given in answer to this question-
Servlet-3 Async Context, how to do asynchronous writes?
Instead of response.getWriter().write(some_big_data);
I've changed that line to
ServletRequest req= ctx.getRequest();
response.getWriter().write(req.getContentType());
Now, request is just timing out. How can I access request object?