  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Close the Stream | Close the Stream 2005-10-04 - By sandeepK
Back no not necessarily.
The more you sweat in peace the less you bleed in war
Sandeep Katiyar Senior Engineer ITX/HEEP/BHEL/Haridwar/Uttaranchal /india +919412070340(MOBILE) 01334265090(HOME) 01334285260(OFFICE) I am parked on the internet at http://skatiyar.com
-- -- Original Message -- -- From: Chris Pratt To: SERVLET-INTEREST@(protected) Sent: Wednesday, October 05, 2005 2:54 AM Subject: Re: Close the Stream
Nope. I always do out of habit and because I consider it cleaner code, but it is the Servlet Engine's responsibility to close the stream if you don't. (*Chris*)
On 10/4/05, SUBSCRIBE EJB-INTEREST anonymous <ahtwog@(protected)> wrote: Hi, I use HttpServletResponse's getOutputStream().println(String) to print a message in servlet. My question is do I have to close the stream before leaving the method. If not,will it impact the performance.
Thanks in advance,
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(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 listserv@(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 listserv@(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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2900.2180" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>no not necessarily.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>The more you sweat in peace the less you bleed in war</FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2>Sandeep Katiyar<BR>Senior Engineer<BR>ITX/HEEP/BHEL/Haridwar/Uttaranchal /india<BR>+919412070340(MOBILE)<BR>01334265090(HOME)<BR>01334285260(OFFICE)<BR >I am parked on the internet at <A href="http://skatiyar.com">http://skatiyar.com</A></FONT></DIV> <DIV> </DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">-- -- Original Message -- -- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=thechrispratt@(protected) href="mailto:thechrispratt@(protected)">Chris Pratt</A> </DIV> <DIV style="FONT: 10pt arial"><B>To:</B> <A title=SERVLET-INTEREST@(protected) href="mailto:SERVLET-INTEREST@(protected)">SERVLET-INTEREST@(protected)</A> </DIV> <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, October 05, 2005 2:54 AM</DIV> <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: Close the Stream</DIV> <DIV><BR></DIV>Nope. I always do out of habit and because I consider it cleaner code, but it is the Servlet Engine's responsibility to close the stream if you don't.<BR> (*Chris*)<BR><BR> <DIV><SPAN class=gmail_quote>On 10/4/05, <B class=gmail_sendername>SUBSCRIBE EJB-INTEREST anonymous</B> <<A href="mailto:ahtwog@(protected)">ahtwog@(protected)</A>> wrote:</SPAN> <BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204 ,204) 1px solid">Hi,<BR>I use HttpServletResponse's getOutputStream().println(String) to print a<BR>message in servlet.<BR>My question is do I have to close the stream before leaving the method.<BR>If not,will it impact the performance.<BR><BR>Thanks in advance,<BR><BR>__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______ __ ____ ____ ___<BR>To unsubscribe, send email to <A href="mailto:listserv@(protected)">listserv@(protected)</A> and include in the body <BR>of the message "signoff SERVLET-INTEREST".<BR><BR>Archives: <A href="http://archives.java.sun.com/archives/servlet-interest.html">http:/ /archives.java.sun.com/archives/servlet-interest.html</A><BR>Resources: <A href="http://java.sun.com/products/servlet/external-resources.html">http:/ /java.sun.com/products/servlet/external-resources.html</A><BR>LISTSERV Help: <A href="http://www.lsoft.com/manuals/user/user.html">http://www.lsoft.com /manuals/user/user.html </A><BR></BLOCKQUOTE></DIV><BR>__ ____ ____ ____ ____ ____ ____ ____ ______ __ ____ ____ ____ ____ ____ ___ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST". <P>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 <P></P></BLOCKQUOTE></BODY></HTML> __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST". <p> 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 <p>
|
|
 |