Thanks for your help. > -----Original Message----- > From: Shapira, Yoav [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 03, 2004 1:57 PM > To: Tomcat Users List > Subject: RE: Finding the log directory > > > > Hi, > > >Is there a container independent way to find the base directory. I > have > >never tried to access CATALINA_HOME from the code before, but I am > guessing > >I can. However, I was wondering if there was a better way to get the > base > >directory. One I get here, I can designate a log directory > for my app. > > > >I am sorry if this is a repeat. I found a similar question in the > archive, > >but the mail-archive indices were wrong at it was inaccessible. > > No, there isn't. The whole concept of a container base > directory is container-specific, not regulated by the Servlet > (or other J2EE) specifications. For many container > installations, the container base directory is not only > completely separate from the webapps location, but also not > writeable by webapps (as a security precaution). > > For Tomcat, you can use System.getProperty("catalina.base") > and/or System.getProperty("catalina.home"). > > Many times, server administrators would not want you logging > anywhere under the server base directory. Rather, they'd > prefer you log to an external or central logging repository. > This is a good reason to expose a configuration logging > directory property (in your config files, via a JNDI > env-entry, or via a system property, up to you) so that your > server admin can set up the application logging the way he/she wants. > > Yoav > > > > This e-mail, including any attachments, is a confidential > business communication, and may contain information that is > confidential, proprietary and/or privileged. This e-mail is > intended only for the individual(s) to whom it is addressed, > and may not be saved, copied, printed, disclosed or used by > anyone else. If you are not the(an) intended recipient, > please immediately delete this e-mail from your computer > system and notify the sender. Thank you. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]