Hi,
That's pretty basic, but I'll greatly appreciate it if someone could please clarify once and for all:
If HttpServlet.service() invokes response.getWriter (or response.getOutputStream), does it need to close the writer at the end ?
On the one hand, I'm used to closing resources right after having finished with them. One the other hand, who's to tell the broser did not request "KeepAlive", in which case you shouldn't close the stream ?
Or could it be that the
servlet container is smart enough to check for "KeepAlive" and if it's present, provide you a Writer whose "close" method has no effect ?
What does the spec say ?
Thanks very much.