|
-
Feb 15th, 2008, 09:36 AM
#1
Thread Starter
Fanatic Member
Viewing HttpServletResponse
Is there a way to view the contents of HttpServletResponse?
Thank you.
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Feb 18th, 2008, 04:40 AM
#2
PowerPoster
Re: Viewing HttpServletResponse
I'm not sure, may be you can use interface called javax.servlet.ServletResponse. One of our Java project we use it to find the set and find the header of a message packet of a chat service.
May be you can find some useful details from there.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Feb 18th, 2008, 06:40 PM
#3
Re: Viewing HttpServletResponse
I guess the HttpServletResponseWrapper is what you're looking for.
 Originally Posted by JavaDoc
Provides a convenient implementation of the HttpServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped response object.
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Feb 20th, 2008, 09:58 AM
#4
Thread Starter
Fanatic Member
Re: Viewing HttpServletResponse
HttpServletResponseWrapper is not quite what I am looking for.
The ServletRequest object has a method called getReader() that will allow me to view the contents of the body. Is there something analogous to this functionality in ServletResponse?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
-
Feb 22nd, 2008, 12:39 AM
#5
PowerPoster
Re: Viewing HttpServletResponse
Did you check the documentation. As far as I remember there is a method as getStream() or getData(), better to check I'm not sure that 100%
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
-
Feb 25th, 2008, 02:39 PM
#6
Thread Starter
Fanatic Member
Re: Viewing HttpServletResponse
I did not see a getStream() or getData() method in the HttpServletResponse object in the javadocs (http://java.sun.com/products/servlet...mr2/index.html)
If there is no way to get the contents of the HttpServletResponse after you written to the object, then why was this functionality excluded?
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|