Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on JspWriter&PrintWriter

Sandya Bhaskara
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm confused...
page 132 HFS-use write() when you get ServletOutputStream from response and use print()/println() when u get a PrintWriter

but in page 293..when JSP becomes servlet...
the example shows..
(The container converts JSP to a servlet-here out is a JspWriter similar to the PrintWriter object we get from response)

From Java I/O i understand that u do have write() method in API for PrintWriter...but why cant we use it when we get a PrintWriter object for response ??why HFS states that we should use should use only println()for PrintWriter?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic