What is it that you’re trying to view? The contents of an HTTP request that was sent somewhere, or the response from the server, or both? And where are you trying to view it from? The client environment, or the HTTP server receiving the request?
In JSP, you can get the request headers using request.getHeaderNames (returns an array IIRC) and then looping over them and using request.getHeader(headername) to get each header’s value.
I don’t know if there’s a way to view the raw HTTP headers exactly as they come into the server, since they’re parsed before the JSP code gets run.
As for the raw POST data, I haven’t been able to find a way to do it with a bit of Googling. It seems that the Java zombies insist that there is no reason anybody could possibly want to get unparsed POST data, so there’s no method for it in the request object. But I’m no Java expert, so who knows.