tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Howard" <>
Subject Re: Writing exception trace to a file
Date Tue, 02 May 2000 15:29:44 GMT
> To avoid inadvertent requests of your trace logs, one option would be to
> the trace file under the "WEB-INF" directory, which the servlet container
> expressly prohibited from serving via requests.  You could do something
> this:
>     String tracePathname =
> getServletContext().getRealPath("/WEB-INF/tracefile.txt");
>     PrintWriter traceWriter = new PrintWriter(new
>     traceWriter.println(...);

I like this idea but the problem I have is that I will have multiple
instances of the jsp app running from multiple directories.  I would like 1
log file for each instance.  Maybe I could tack on some directory
information to the log file name.

Thanks again,

View raw message