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 doubt in flushBuffer 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 "doubt in flushBuffer" Watch "doubt in flushBuffer" New topic
Author

doubt in flushBuffer

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
In my servlet I write :

response.flushBuffer();
response.sendError(404);

The servlet API says :

flushBuffer() : Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.

sendError() : If the response has already been committed, this method throws an IllegalStateException.

But in my servlet I don't see any exception sent .
Rodrigo W Bonatto
Ranch Hand

Joined: Aug 20, 2004
Posts: 62
Hi,

I have posted the same question about your doubt:

http://www.coderanch.com/t/169085/java-Web-Component-SCWCD/certification/HttpServletResponse-IllegalStateException

Try looking at $CATALINA_HOME/logs and open the lastest log file.
The exception *must* be there.

Regards,

Rodrigo


SCJA, SCJP, SCJD, SCWCD, SCBCD5, SCDJWS, SCEA5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt in flushBuffer