Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP out.write vs out.print

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1754
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic