• Post Reply Bookmark Topic Watch Topic
  • New Topic

Qn on Servlets

 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

1. If we write to the PrintWriter, after we flush, is it an exception/is it ignored

2. if we write to the PrintWriter, after we close the writer is it an exception/is it ignored

Can anybody pls answer
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After you write to the PrintWriter you can flush() otherwise exception
This is my opinion but I'm not sure
 
Chandrakanth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not getting any exceptions if we write to a print writer obj, after we close the obj, or flush.

SO, is this the behaviour expected/ or its the exception
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!