You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cui Xiaojing-a13339 <a1...@motorola.com> on 2003/11/20 04:42:53 UTC
append text into a file
Hello All,
Could please give me some advice about how to append some data into an existed log file? Thanks.
Regards,
Xiaojing
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: append text into a file
Posted by Harry Mantheakis <ha...@mantheakis.freeserve.co.uk>.
Hello
> Could please give me some advice about how to append some data into an existed
> log file? Thanks.
The GenericServlet.log method (which HttpServlets inherit) appends to the
log file - within a servlet, just call 'log'.
In a JSP you can do the same thing using the ServletContext.log method. The
ServletContext is referenced through the 'application' object that is given
to you by the container - hence, just call 'application.log' within a JSP
scriptlet.
Regards
Harry Mantheakis
London, UK
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: append text into a file
Posted by Galbayar <ga...@mobinet.mn>.
FileWriter(File file, boolean append)
FileWriter(String fileName, boolean append)
-----Original Message-----
From: Cui Xiaojing-a13339 [mailto:a13339@motorola.com]
Sent: Thursday, November 20, 2003 11:43 AM
To: Tomcat Users List
Subject: append text into a file
Hello All,
Could please give me some advice about how to append some data into an
existed log file? Thanks.
Regards,
Xiaojing
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org