• Post Reply Bookmark Topic Watch Topic
  • New Topic

ASP's Response.Clear equvalient  RSS feed

 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there an equvalient of Asp's Response.Clear method in JSP?
I have a printwriter object that I write some text to the client but in front of this process, an error occurs and program falls into the catch statement where I want to cancel the writings and Write only the error.?
Is it possible?
Thanks
Murat
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you define an error page, and if an error occurs, the response will automatically be cleared and control transferred to the error page if the response has not already been commited. A response gets commited when the response buffer fills and is sent to the client. After this point it's too late to decide to send them somewhere else!
Dave
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!