wood burning stoves 2.0*
The moose likes Servlets and the fly likes Buffer the entire Response Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Buffer the entire Response" Watch "Buffer the entire Response" New topic
Author

Buffer the entire Response

Vasim Patel
Ranch Hand

Joined: Apr 29, 2004
Posts: 87
Hi

Is there a way in which I can buffer the entire servlet response(headers and content) and send it to the client?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
I suppose you could use the response method setBufferSize() with some outlandish value. Why?
Bill
Peter Bell
Greenhorn

Joined: Mar 25, 2003
Posts: 19
You can't send redirects after you've started sending pages. So maybe that's why? But if that was the case, you're still better off figuring out if you need to redirect or not before anything is written to the response.


RimuHosting - JSP and Java Hosting
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Buffer the entire Response
 
Similar Threads
HttpServletResponse.getOutputStream() - streaming or not streaming?
Re: Committing response in response buffer
some confusions
when loading jsp page.........
JSP Page doubt?