Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 57077 invoked from network); 8 May 2000 18:34:45 -0000 Received: from unknown (HELO mail1.ecal.com) (216.150.139.6) by locus.apache.org with SMTP; 8 May 2000 18:34:45 -0000 Received: from eCal.com ([24.28.201.35]) by mail1.ecal.com (Post.Office MTA v3.5.2 release 221 ID# 30-55765U3000L300S0V35) with ESMTP id com for ; Mon, 8 May 2000 14:34:39 -0400 Message-ID: <39170944.C06278A0@eCal.com> Date: Mon, 08 May 2000 14:36:52 -0400 From: dboyer@ecal.com (Dave Boyer) X-Mailer: Mozilla 4.72 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-user@jakarta.apache.org Subject: Re: Logging to File References: <3916F961.50FCA2FB@eCal.com> <391703B6.9F3D2598@aamc.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Steve Weiss wrote: > I'm doing something very similar, I put this in my application's > web.xml: > > > SYSLOG_FILE > > /home/steve/dev/java/webapps/currmit/logs/web.log > > > Then I read in the SYSLOG_FILE parameter when my servlet is initialized > and open the file. Works fine for me (on Linux). > When you say you read in the SYSLOG_FILE parameter, what exactly do you mean? Class and function preferrably and where you read and process this parameter... Am I correct that the tomcat engine limits the access of a servlet to the system it's located on. In other words, the classes are loaded within a sandbox of some type which limits the access of those files to system resources? So, I can't write files all over the System the servlet runs on. Am I correct that all JSP pages and all servlets within my web-app directory have access to the same ServletContext instance? If so this is the place to put my Logger. I would like to initialize some Application wide objects the first time any Servlet or JSP page is loaded. I would like to create one instance of the logger, and a connection pool for interacting with an XML datasource. Is there a way to do this without placing code in every single Servlet and JSP page to ensure that initialization has taken place?