This brings up a question I've had for some time. Whose resposibility is
it to close the output stream? It would seem reasonable to me that the
servlet engine should do this but it doesn't seem to hurt anything for the
servlet to do this (on the few engines I've tried). Does the spec mention
this? Would it cause a problem for any servlet engine if the servlet
closed this?
If this isn't mentioned in the spec maybe it should be.
Comments and/or suggestions?
Bob
At 11:44 AM 5/6/99 -0500, you wrote:
>Try adding out.close(); at the end of the servlet. If you don't close the
>stream, sometimes the buffer doesn't get written to the browser.
>
>At 10:08 AM 6/05/99 -0500, you wrote:
>
>> public class Home extends HttpServlet {
>> public void doGet(HttpServletRequest req, HttpServletResponse res)
>> throws ServletException, IOException {
>> res.setContentType("text/html");
>> PrintWriter out = res.getWriter();
>> out.println("<HTML>");
>> out.println("<HEAD><TITLE>Hello World</TITLE></HEAD>");
>> out.println("<BODY>");
>> out.println("<BIG>Hello World</BIG>");
>> out.println("</BODY></HTML>");
> out.close(); <------ NEW LINE
>> }
>> }
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html