• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doubt in flushBuffer

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have posted the same question about your doubt:

https://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
 
reply
    Bookmark Topic Watch Topic
  • New Topic