You may also use the log-methods in javax.servlet.ServletContext
peter
-----Ursprüngliche Nachricht-----
Von: Martin Kuba <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Montag, 15. November 1999 14:12
Betreff: Re: file and servlet
>Antonio Mancuso wrote:
>>
>> Hello,I have a problem. I need to impelment a log file in my servlet.
>> So I am able to write into a log file, but every time my servlet is
init()
>> the file is overwritten and not append.
>> SO how can I solve my problem?
>> Excuse me if the question is not really pertinent to the servlet, but I
>> don't know where find some information.
>
>Use
>
>try {
> log = new PrintWriter(
> new BufferedWriter(
> new OutputStreamWriter(
> new FileOutputStream("myfile.txt",true))));
> }catch(Exception e){}
>
>Martin
>--
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> INET, a.s. Mgr. Martin Kuba
>Kralovopolska 139 e-mail: [EMAIL PROTECTED]
> 601 12 Brno WWW: http://www.inet.cz/~makub/
> Czech Republic tel: +420-5-41242414/32
>--------------------------------------------------------------------
>PGP fingerprint = D8 57 47 E5 36 D2 C1 A1 C3 48 B2 59 00 58 42 27
> http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
>--------------------------------------------------------------------
>
>___________________________________________________________________________
>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