tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom van Wietmarschen <>
Subject Re: Response already comitted on first line of servlet
Date Fri, 04 Jul 2008 07:21:20 GMT
Tom van Wietmarschen wrote:
> L.S,
> I'm investigating a problem in which one of our servlets doesn't return
> any headers most of the time (sometimes it does work, but it seems quite
> random) After a bit of digging I found out that the reason the headers
> aren't added is that the response already seems to be comitted.
Okay, I found and fixed the bug yesterday evening, I was using a 
MemoryCacheImageOutputStream that I didn't dispose of properly. So when 
it got garbage collected it closed the outputstream in its finalize 
method, and since the response object is recycled this comitted the 
response of a subsequent run.


**Tom van Wietmarschen**
Software Engineer

Service2Media B.V.
Vreelandseweg 7
1216 CG Hilversum

Capitool 41           
7521 PL Enschede

Tel  +31 (0)35 626 46 12
Fax +31 (0)35 626 46 13 <>

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message