tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: AW: AW: AW: java.io.IOException: Stream closed
Date Sun, 14 Dec 2008 15:24:08 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan,

Schuster Stefan wrote:
> As far as I can tell, the XML-Beans generated code works well - even if
> The stream is closed after reading, this should be no problem as the next
> request will submit a new stream, right?

Yes, your servlet can close an input stream when it's done reading (even
if the request is one of several keep-alive requests). You better make
sure you're done reading it, though ;)

Generally, I don't ever close servlet input streams (or readers). The
container will clean up after input streams after the request processing
has been completed by your servlet. I find that such cleanup adds
confusion to your servlet code and doesn't add any benefit.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklFJRgACgkQ9CaO5/Lv0PCI1ACeJIKLuvS28oyEvlku55jiAf4+
0Y0An0nwvNMKdlq3qPQsrl+oKilOVI7O
=goca
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message