Description
Currently, the ScopedServletUtils.getScopedResponse() routine caches the new ScopedResponse result of the first call in the outer request. Then on any subsequent calls it just returns the cached ScopedResponse from the outer request.
In some cases there may be multiple calls to getScopedResponse() for a particular scope and a need to pass in a different real Response parameter. However, in these cases the returned ScopedResonse in the subsequent calls will be the cached one which was created in the first call to getScopedResponse() and wraps a different real Response. A modification to ScopedServletUtils could allow one to get a new ScopedResonse instance that wraps the different real Response rather than the cached ScopedResonse.
Could add a new method to ScopedServletUtils, such as updateScopedResponse(), that would allow callers to get the new ScopedResponse instance. The method would also replace the cached ScopedResponse on the outer request with the new ScopedResponse.