File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes IllegalStateException problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "IllegalStateException problem" Watch "IllegalStateException problem" New topic
Author

IllegalStateException problem

Joshua Antony
Ranch Hand

Joined: Jun 05, 2006
Posts: 254


Above is part of a code in a Servlet.
But I am not getting IllegalStateException in the line
writer.println("After Flush"); although I have committed the response
the line before.

Where am I going wrong?

Regards,
Joshua


SCJP,SCWCD, Into ATG now!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Nothing prevents you from outputting after it has been flushed.


[My Blog]
All roads lead to JavaRanch
Tridib Samanta
Ranch Hand

Joined: Apr 28, 2004
Posts: 128
No method of PrintWriter class throws IllegalStateException. You will get IllegalStateException if you try to forward the request to other page after calling flush().


Thanks, Tridib
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: IllegalStateException problem