Guys, We run an internal mass web hosting platform for our clients. In order to protect them as much as poss we make their areas read only. We set the normal java.io.tmpdir to be a writeable area.
We've hit an issue at the moment where sometimes under certain conditions the DefaultCompilerAdapter gets called. This seems to think that as getJavac().getTempdir() has returned null (if anyone knows how to get the tempdir set please let me know) it should write its temp file in the users home dir. The users home dir is read only. How do i set what ever it needs to write the temp file in the right place ? I've set the scrachdir for org.apache.jasper.servlet.JspServlet but still to no avail. Or failing that could not protected int executeExternalCompile(String args[], int firstFileName, boolean quoteFiles) { String commandArray[]; File tmpFile; commandArray = null; tmpFile = null; if(Commandline.toString(args).length() > 4096 && firstFileName >= 0) { PrintWriter out = null; try { File userDir = getJavac().getTempdir(); if(userDir == null) { String userDirName = System.getProperty("user.dir"); userDir = new File(userDirName); } tmpFile = fileUtils.createTempFile("files", "", userDir); tmpFile.deleteOnExit(); be written as protected int executeExternalCompile(String args[], int firstFileName, boolean quoteFiles) { String commandArray[]; File tmpFile; commandArray = null; tmpFile = null; if(Commandline.toString(args).length() > 4096 && firstFileName >= 0) { PrintWriter out = null; try { tmpFile = java.io.File.createTempFile( "files", ""); tmpFile.deleteOnExit(); Thanks david -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]