Hi I have a LogFile Class that writes a specific log if I set a debug variable to true. When I compile it at my local mashine (JDeveloper) it is written to the basedirectory of the classes. But when I upload them to the apache webserver (Oracles default web/jspserver) it writes the log to the winnt\system32 directory. How do I force it to write to a specific directory based on the class file (example a log directory under the directory that the Logger.class is placed in)?
Code FileOutputStream fos = null; try { File f = new File(pFile); if(!f.exists()) { fos = new FileOutputStream(f); } else { fos = new FileOutputStream(pFile, true); } pText += "\n"; fos.write( (new Date( System.currentTimeMillis() ).toString() + " : ["+ pFunction +"] " + pText).getBytes() ); } catch(Exception e) { /* Do nothing */ } finally { try { fos.close(); } catch(Exception e) { /* Do nothing */ } } Thanks for any help Jan Arenö =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com