wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes getWriter() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "getWriter() method" Watch "getWriter() method" New topic
Author

getWriter() method

Mahesh Barik
Greenhorn

Joined: Aug 14, 2006
Posts: 15
when should we use getWriter() method?
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Hi, welcome to the ranch!

Did you find getWriter() on HttpServletResponse? If so, we use that when we want a servlet to write something back to the browser. Once we have the writer we can write HTML or whatever we like.



If you found it somewhere else, the answer will probably be similar, but you'll need to show us where you found it to be sure.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Mahesh Barik
Greenhorn

Joined: Aug 14, 2006
Posts: 15
Thanks for your response
I have used in servlet.But my question is :
PrintWriter and System classes both are used for output purpose.
(using println() method)
what are the cases in which each should be used?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getWriter() method