Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 23790 invoked from network); 21 Aug 2007 05:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Aug 2007 05:28:55 -0000 Received: (qmail 1335 invoked by uid 500); 21 Aug 2007 05:28:50 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 1305 invoked by uid 500); 21 Aug 2007 05:28:50 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Delivered-To: moderator for scm@geronimo.apache.org Received: (qmail 87053 invoked by uid 99); 21 Aug 2007 05:03:45 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jgawor@gmail.com designates 209.85.198.185 as permitted sender) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=Sc3CHZiUrJnVGhXqxuKmC1QLpw3dnPfmYzKATtn6jKqPaobmBUb2P2yOJnC2zEX6GEhQ7gmv/zHPkpGIxLFpiH7pzW3Wm4nD2aimpTfIcuvdC8y8EWUfeH6/InePtxxT8dL6cayVmLn059TBo4kkmeWGsmwTWmQ9fo/Tf/VPQ5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=npmf3OVDYZsfE5iTqW1zNFu1/Cpg6N8bvMroFP8yZeSR4kVCPw+WuVA3qxN2fjIUHcZjztyuI5lE2YKGFMBAuOETWugFTeh8uc80DIf0wqZ5YKObh8puxLWJ6oZmEv/QnNoNuLU+nPnV7O82YLVtoSvRqIfEDSi7u/Jcu2Ds5r4= Message-ID: <5eb405c70708202203w4c457228he44a03bb16d52cca@mail.gmail.com> Date: Tue, 21 Aug 2007 01:03:20 -0400 From: "Jarek Gawor" To: dwoods@apache.org Subject: Re: svn commit: r567944 - in /geronimo/server/trunk: applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/ configs/remote-deploy-tomcat/src/main/ configs/remote-deploy-tomcat/src/main/resources/ configs/remote-deplo Cc: scm@geronimo.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Donald, I think you need to check the result of temp.createNewFile() because you could end up deploying an invalid or incorrect file. Jarek On 8/21/07, dwoods@apache.org wrote: > Author: dwoods > Date: Mon Aug 20 21:22:33 2007 > New Revision: 567944 > > URL: http://svn.apache.org/viewvc?rev=567944&view=rev > Log: > GERONIMO-3420 create the remote-deployer files with their original filenames, so WAR deployments without aweb.xml or context root will have the correct base filename to use as the deployed context > > Added: > geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/ > geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/ > geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/ > geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml (with props) > Modified: > geronimo/server/trunk/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java > > Modified: geronimo/server/trunk/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java > URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java?rev=567944&r1=567943&r2=567944&view=diff > ============================================================================== > --- geronimo/server/trunk/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java (original) > +++ geronimo/server/trunk/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java Mon Aug 20 21:22:33 2007 > @@ -84,7 +84,7 @@ > */ > DataInputStream in = null; > try { > - String fileName, fileExt; > + String fileName; > in = new DataInputStream(request.getInputStream()); > // 0) an int, the version of this datastream format - REMOTE_DEPLOY_REQUEST_VER > int reqVer = in.readInt(); > @@ -100,20 +100,14 @@ > for(int i=0; i // 2.0) a UTF String, the filename of the file being uploaded > fileName = in.readUTF(); > - if (fileName != null) { > - int fileSep = fileName.lastIndexOf('.'); > - if (fileSep != -1) { > - fileExt = fileName.substring(fileSep); > - } else { > - fileExt = ""; > - } > - } else { > - fileExt = ""; > - } > // 2.1) a long, the length of the file in bytes > long length = in.readLong(); > // create the local temp file > - File temp = File.createTempFile("remote-deploy", fileExt); > + //File temp = File.createTempFile("remote-deploy", ""); > + // Note: Doing this because WAR files have to be their original names to > + // handle the case where no web.xml or context root was provided > + File temp = new File(System.getProperty("java.io.tmpdir"), fileName.trim()); > + temp.createNewFile(); > temp.deleteOnExit(); > names[i] = temp.getAbsolutePath(); > // 2.2) raw bytes, equal to the number above for the file > > Added: geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml > URL: http://svn.apache.org/viewvc/geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml?rev=567944&view=auto > ============================================================================== > --- geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml (added) > +++ geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml Mon Aug 20 21:22:33 2007 > @@ -0,0 +1,48 @@ > + > + > + > + > + > + > + Geronimo Remote-Deploy Web App (Tomcat) > + ${pom.groupId}/${pom.artifactId}/${version}/car > + Core Geronimo > + > + The Remote-Deploy application for Geronimo. > + > + http://geronimo.apache.org/ > + The Apache Geronimo development community > + BSD -- Apache Software License (ASL) 2.0 > + > + ${version} > + > + > + org.apache.geronimo.configs/tomcat6//car > + Web Container > + > + This version of the Remote-Deployer requires the Geronimo/Tomcat distribution. > + It is not intended to run in the Geronimo/Jetty distribution. > + There is a separate version of the application that works with Jetty. > + Please install the version appropriate to your Geronimo distribution. > + > + > + org.apache.geronimo.configs/j2ee-server//car > + > + > + http://download.boulder.ibm.com/ibmdl/pub/software/websphere/wasce/plugins-${version}/ > + > > Propchange: geronimo/server/trunk/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml > ------------------------------------------------------------------------------ > svn:eol-style = native > > >