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 Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSPWriter difference write vs. print? 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 » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSPWriter difference write vs. print?" Watch "JSPWriter difference write vs. print?" New topic
Author

JSPWriter difference write vs. print?

andy armstrong
Ranch Hand

Joined: May 14, 2002
Posts: 154
What is the difference between the two
and when to best use?


Certifications: <br />scp2, scea, scwcd, WL7.0, CISSP, XML
Arvind Chavar
Ranch Hand

Joined: May 16, 2001
Posts: 53
The write methods give you limited capability of kind of data types you could write to char[],int , and String.Whereas with print methods you gain flexibilty to write other primitive types and objects.Based on these factors you could choose what you need.
Another point of comparison you would look atis issue of buffering.Neither of them have any advantage over the other as JSP output is buffered by default.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSPWriter difference write vs. print?
 
Similar Threads
WA #1.....word association
Array Initilaize
interview question
Clarification
Why anonymous posts are allowed in this forum ?