• Post Reply Bookmark Topic Watch Topic
  • New Topic

any difference between JspWriter.print() and write()

 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
When JSP file is translated into servlet class, the plain text is wrapped in the JspWriter.write()(Actually JspWrtier.writer() inherites from its superclass java.io.writer.write()), while the JSP expressions are wrapped into JspWriter.print().
Any difference between this two methods? Why not just use one method?

Thanks a lot.

Hai
 
Hai Lin
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
No one give me the answer. I guess: write() is to write the output to the buffer, while the print() doesn't go to buffer.
Anyone can confirm this?

Thanks.

Hai
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you could read the API docs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!