This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 12759
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
Similar Threads
Nullpointer exception in servlet
Printwriter vs System.out.println()
Buffered Reader problems
Why can't get the object "out" in this way?