File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in flushBuffer

 
Sim Kim
Ranch Hand
Posts: 268
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic