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 commiting response Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "commiting response" Watch "commiting response" New topic
Author

commiting response

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
should I always call isComitted before using sendError.
am I right in my assumption.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Either that, or handle the IllegalStateException.
Which of the two? That depends on how exceptional (rare) the condition would be. If you should not have generated enough content to commit the response, handling the exception is good enough. If on the other hand you might well have generated quite a bit of content, an exception is appropriate and you should check isCommitted() (or, more likely, amend your design so that error conditions are caught before response generation starts; an MVC design usually does the trick).
- Peter
 
 
subject: commiting response
 
Threads others viewed
The x900 effect ?
Text box value is not being completely filled with request attribute
Posting to bump up my count...
Cant use object from another class
WA #1.....word association
developer file tools