PQ71782: RESPONSE BUFFER NOT CLEARED BEFORE IT IS COMMITTED. SETBUFFERSIZE NOT HONORED ON THE RESPONSE STREAM. | |||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description Problem: WebSphere 5.0 does not clear the response buffer before it is committed. The setBufferSize on the response stream is not being honored. . Possible Solution: Don't commit the response unless the buffer if full . More info from customer (PMR 59829,004,000): We are currently evaluating change scenarios to SSN in order to be compatible with WAS. . However, we maintain the view that the container should not commit a response from an include. To quote the servlet 2.3 specification: . SRV.8.3 The Include Method, paragraph 2: "It can only write information to the ServletOutputStream or Writer of the response object and commit a response by writing content past the end of the response buffer, or by explicitly calling the flushBuffer method of the ServletResponse interface. It cannot set headers or call any method that affects the headers of the response. Any attempt to do so must be ignored." . We do not write any response so we do not write past the end of the response buffer. We do not explicitly call flushBuffer. We do not try to set headers in adminLoginPrc but even if we did, it should be ignored. The web container should not make the assumption that we did any of the above and automatically commit the response. . Furthermore, we believe it contradicts the sentence, "If output data exists in the response buffer that has not been committed, the content must be cleared before the target servlet's service method is called", found in the following: . SRV.8.4 The Forward Method, paragraph 1: "The forward method of the RequestDispatcher interface may be called by the calling servlet only when no output has been committed to the client. If output data exists in the response buffer that has not been committed, the content must be cleared before the target servlet's service method is called. If the response has been committed, an IllegalStateException must be thrown." . Hence, it is possible to have output in the response buffer but not have it committed yet. It is the duty of the web container to clear it before the servlet is actually serviced. . We would be extremely interested in your comments and those of the IBM web container developers. We would be delighted if you could tell us that no change needs to be made in SSN.Local fix No known work around.Problem summary **************************************************************** * USERS AFFECTED: WebSphere Application Server users of * * Servlets and JSPs attempting to * * set headers after includes. * **************************************************************** * PROBLEM DESCRIPTION: WebSphere ignores attempts to set * * header fields once an include to * * a resource is performed. * **************************************************************** * RECOMMENDATION: * **************************************************************** WebSphere does not allow the user to set header fields in the top level resource after using a request dispatcher to include to another resource. The specification states that one cannot set any header fields inside of the included resource but does not disallow the top level resource from setting headers after returning from a dispatch to an included resource.Problem conclusion Modified the webcontainer code to not commit the response before returning from an include unless the response buffer is flushed as a result of that include.Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ71782
IBM Group: Software Group
Modified date: Mar 10, 2003
(C) Copyright IBM Corporation 2000, 2008. All Rights Reserved.