aspose file tools
The moose likes Servlets and the fly likes JspWriter Vs PrintWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "JspWriter Vs PrintWriter" Watch "JspWriter Vs PrintWriter" New topic
Author

JspWriter Vs PrintWriter

lokesh reddy
Ranch Hand

Joined: Sep 15, 2000
Posts: 66
What are the advantages of using JspWriter on PrintWriter class?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12327
    
    1
To quote from the documentation that comes with Tomcat:
"This abstract class emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes, however it differs in that it throws java.io.IOException from the print methods which PrintWriter does not."
The advantage of throwing an exception is that if your HTTP connection is broken for some reason, your JSP won't sit there trying to send characters to a broken connection.
Bill

------------------
author of:


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JspWriter Vs PrintWriter
 
Similar Threads
implicit objects question
JspWriter
Outputting help
Diff. PrintWriter versus JSPWriter
JspWriter vs PrintWriter