Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 25330 invoked from network); 14 Sep 2004 18:52:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Sep 2004 18:52:37 -0000 Received: (qmail 33289 invoked by uid 500); 14 Sep 2004 18:52:10 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 33129 invoked by uid 500); 14 Sep 2004 18:52:07 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 33072 invoked by uid 99); 14 Sep 2004 18:52:07 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [63.244.250.132] (HELO mustang.mpi.com) (63.244.250.132) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 14 Sep 2004 11:52:06 -0700 Received: from lightning.mpi.com (lightning [63.244.252.11]) by mustang.mpi.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id i8EIq110029280 for ; Tue, 14 Sep 2004 14:52:02 -0400 (EDT) Received: from US-VS1.corp.mpi.com (us-be2.corp.mpi.com [63.244.252.32]) by lightning.mpi.com (Switch-3.1.6/Switch-3.1.6) with ESMTP id i8EIpwnF001982 for ; Tue, 14 Sep 2004 14:51:58 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Tomcat 4.1.30 (although its still there in tomcat 5.0.28) temp file issue. Date: Tue, 14 Sep 2004 14:51:08 -0400 Message-ID: <9C5166762F311146951505C6790A9CF80229C125@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Tomcat 4.1.30 (although its still there in tomcat 5.0.28) temp file issue. Thread-Index: AcSaallmg4/fT6sESbmG/UMCBsgiQAAIT07A From: "Shapira, Yoav" To: "Tomcat Developers List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N H= i, Ant 1.6 adds a tempdir attribute to the Javac task. You can use that = to se the tempdir via Ant or in the DefaultCompilerAdapter. You will nee= d to run with Ant 1.6 or later obviously, and also have a custom version= of DefaultCompilerAdapter. If you'd like your enhancement to be porte= d into the main tomcat code, please submit an enhancement issue to Bugzilla with the .diff that includes the new compiler option. Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: David Cassidy [mailto:david.cassidy@db.com] >Sent: Tuesday, September 14, 2004 10:52 AM >To: Tomcat Developers List >Subject: Tomcat 4.1.30 (although its still there in tomcat 5.0.28) te= mp >file issue. > > >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 onl= y. >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 =3D null; > tmpFile =3D null; > if(Commandline.toString(args).length() > 4096 && firstFileNam= e >=3D >0) > { > PrintWriter out =3D null; > try > { > File userDir =3D getJavac().getTempdir(); > if(userDir =3D=3D null) > { > String userDirName =3D System.getProperty("user.dir"); > userDir =3D new File(userDirName); > } > tmpFile =3D fileUtils.createTempFile("files", "", userDir); > tmpFile.deleteOnExit(); > > >be written as > > protected int executeExternalCompile(String args[], int firstFileName, >boolean quoteFiles) > { > String commandArray[]; > File tmpFile; > commandArray =3D null; > tmpFile =3D null; > if(Commandline.toString(args).length() > 4096 && firstFileNam= e >=3D >0) > { > PrintWriter out =3D null; > try > { > tmpFile =3D java.io.File.createTempFile( "files", "")= ; > tmpFile.deleteOnExit(); > >Thanks >david > > >-- > >This e-mail may contain confidential and/or privileged information. I= f 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: tomcat-dev-unsubscribe@jakarta.apache.org >For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org