Reputation: 25974
How do you debug HttpServletResponse, when you would like to see what is about to be returned. That is header and content, well basically all.
info: resp.setContentType("text/html");
Thanks in advance
Upvotes: 3
Views: 515
Reputation: 15456
You should write your own OutpustStream
wrapper using Filter
and HttpServletResponseWrapper
. Intercept the content which is written to the response.
Upvotes: 2
Reputation: 41143
You can search your source code for anything that writes into the HttpServletResponse's output stream. HttpServletResponse doesn't keep the whole copy of everything that has been written to it. Also you can read the javadoc for all the get* method to find more information about that particular HttpServletResponse
http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletResponse.html
Upvotes: 1