>From the servlet 2.3 Specification: SRV.3.7.1 Temporary Working Directories
A temporary storage directory is required for each servlet context. Servlet containers must provide a private temporary directory per servlet context, and make it available via the javax.servlet.context.tempdir context attribute. The objects associated with the attribute must be of type java.io.File. -----Original Message----- From: Stephen Bacon [mailto:[EMAIL PROTECTED]] Sent: 13 August, 2002 5:20 PM To: [EMAIL PROTECTED] Subject: Writing files from a class Hello, I'm trying to migrate from Tomcat 3 to Catalina (under Linux) and I've hit a snag. Several of my custom classes which I use from JSPs (e.g. ConnectionPool) print messages to debug files which I access via: <snip> pwDebug = new PrintWriter(new FileOutputStream(m_sDebugFileName, true)); pwDebug.println(m_sdf.format(new java.util.Date()) + " " + sparMsg); <snip> Previously, it would create / append to the file in the location that Tomcat was started from (so I had made sure it was always done from a logs directory - a kludge yes, but it worked) Well, Tomcat 4 seems to have added security which is blocking this. I made a modification to pull the debug file name from the web.xml file and made sure the target directory specified (/var/tomcat4/webapps/<appname>/logs) was owned by the user "tomcat4", and had the write flags turned on. No go - still no debug file (it writes an init message so there should be something) This of course is a big problem because my classes have now all become black boxes and I'm unable to debug problems. Is this something to do with security under T4? Is there a "proper" means by which messages should be logged? Have I configured something wrong? The app seems to be running OK, but I have no way to be sure without the ability to print debug messages. Any ideas? thanks, -Steve -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
