• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

flush() method  RSS feed

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I was trying to give the flush statement like, and then trying to forward the request to another JSP, but it is not throwing any IllegalStateException. But i have read it something like, after calling the flush method, we should not forward the request to any other Jsp/Servlet.
out.flush();
rd.forward(request, response);
And also i Tried, flushing after the rd.forward(), then try to give some out.print(), but still in this case also it is not throwing any Exception.
Please let me know what could be the problem.

Thanks In Advance,
Srinivas.
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I bet that you're using Tomcat The dirty animal seems to allow the forwarding, even after a flush. Not very spec compliant, is it ?
You'll get the exception with Weblogic.
 
Ranch Hand
Posts: 10191
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satou is right!
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even websphere gives the exception.
 
I've never won anything before. Not even a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!