Meaningless Drivel is fun!
The moose likes Servlets and the fly likes PrintWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "PrintWriter" Watch "PrintWriter" New topic


Ravi Singh
Ranch Hand

Joined: Aug 02, 2004
Posts: 51
Does the HttpServletResponse PrintWriter output to a buffer, or is output sent straight to the browser?
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Read the javax.servlet.ServletResponse API and you will see the setBufferSize() method call. HttpServletResponse inherits this behavior.
Ripan Karmakar

Joined: Jul 28, 2004
Posts: 16
I not get u clear ... plz make it clear... with proper example.......

"Strenght is Life and Weakness is Death"<br />Java/J2EE Developer<br />UshaComm Pvt. Ltd, Kolkata, INDIA
Ravi Singh
Ranch Hand

Joined: Aug 02, 2004
Posts: 51
What I don't understand is if the PrintWriter of the HttpServletResponse performs buffering what is the need for the JspWriter which also performs buffering?
Susanta Chatterjee
Ranch Hand

Joined: Aug 12, 2002
Posts: 102
Please read the API for both PrintWriter and JspWriter. Compare the methods available for them.
I agree. Here's the link:
subject: PrintWriter
It's not a secret anymore!