Meaningless Drivel is fun!*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JspWriter vs PrintWriter" Watch "JspWriter vs PrintWriter" New topic
Author

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.
 
Consider Paul's rocket mass heater.
 
subject: JspWriter vs PrintWriter