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 Q on ServletResponse: more ways to commit a response? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Q on ServletResponse: more ways to commit a response?" Watch "Q on ServletResponse: more ways to commit a response?" New topic
Author

Q on ServletResponse: more ways to commit a response?

Gian Franco
blacksmith
Ranch Hand

Joined: Dec 16, 2003
Posts: 975
Hi,

A ServletResponse object is valid until committed.
I know flush() of the classes ServletOutputStream
and PrintWriter commit the response, are there any
other ways?

Cheers,

Gian


"Eppur si muove!"
Abhishek Mahanty
Greenhorn

Joined: Jan 26, 2004
Posts: 19
Hi,
Well flush() explicitly commits a response while there are scenarios where the response gets committed implicitly. e.g.

response.sendRedirect()
response.sendError()

I think there are others too .. may be someone else will add in.

Abhi.


SCEA-I, SCBCD 1.3, SCWCD 1.4, SCJP 1.4, OCP
 
 
subject: Q on ServletResponse: more ways to commit a response?
 
Similar Threads
JSP Page doubt?
Committing response
Tomcat is logging IllegalStateException whenever it invokes processHttpRequest()
ServletResponse.isCommitted()
ServletOutputStream