Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The concept of buffering in servlets

 
nebula kodatham
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

The response.reset() of HttpServletResponse should throw IllegalStateException if it is called after the response has been commited. In my code i have used isCommited()to find out if the response is commited and it gives true. After the response is commited i call the reset()which sholud give an exception as expected.But i am not getting any exception......i get the response without any exceptions which should not be the case.Why am i not getting any exception. Can anyone give a small sample code illustrating the usage of reset().


here's my code


[ November 10, 2005: Message edited by: Mark Spritzler ]
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry but why on earth do you care? It is bad enough overriding the service() method - that is not considered good practice - but why do you need the reset() to throw an exception? Perhaps it is a bug - you don't tell us what container you're using. But I can't figure out why you want the exception. Is there a good reason or is this a fishing expedition?
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well right now your flushBuffer() call is remarked off.

I am going to move this to the Servlets forum.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic