File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes JspWriter vs PrintWriter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JspWriter vs PrintWriter" Watch "JspWriter vs PrintWriter" New topic

JspWriter vs PrintWriter

vara prasad
Ranch Hand

Joined: Dec 21, 2004
Posts: 47
what is difference between JspWriter and PrintWriter ?
Frederic Filiatrault
Ranch Hand

Joined: Jul 12, 2004
Posts: 69
Hi !

The first one begins with the letter "J-S-P" and the other begins with the letters "P-R-I-N-T"....

Ok, seriously. In case of a JSP File, you always have to use a JSPWriter because the output behavior depends if the page is buffered or not. Also, you can have a IOException (print, println in PrintWriter do not have one).

Here`s the link for more info:

JSPWriter Class

F.<br />SCJP, SCJD, SCWCD, SCBCD<br /> <br />Failure is not an option... It comes with the software bundle.
I agree. Here's the link:
subject: JspWriter vs PrintWriter
jQuery in Action, 3rd edition