• 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?
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!