wood burning stoves 2.0*
The moose likes JSP and the fly likes JSP out.write vs out.print Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP out.write vs out.print" Watch "JSP out.write vs out.print" New topic
Author

JSP out.write vs out.print

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Hi All,

The translation of JSP file to Java file shows that all the expressions are transformed to out.print() method while all the HTML template text is written using out.write() . Why so ? Any inputs ?
[ June 01, 2008: Message edited by: SIM KIM ]
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Take a look at the relevant APIs.

What do you think the type of a rtexpr would be?
What do you think the type of "template text" would be?

Based on this knowledge which calls in the API would you use?
There is a method print(Object). There is no method write(Object)
write(String) exists however.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP out.write vs out.print
 
Similar Threads
el-ignored query
Resin doesn't compile JSP properly while Tomcat does
Conversion of JSP into Servlet
include file directive, how the included jsp file is built?
How to out.print in a JSP function..