my dog learned polymorphism*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
 
Similar Threads
resetBuffer() OR flushBuffer()
Response Headers
IllegalStateException doubt ?
ServletResponse.isCommitted()
Response Commited