You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2007/08/21 05:47:03 UTC
svn commit: r567934 - in /geronimo/server/branches/2.0:
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-depl...
Author: dwoods
Date: Mon Aug 20 20:47:03 2007
New Revision: 567934
URL: http://svn.apache.org/viewvc?rev=567934&view=rev
Log:
GERONIMO-3420 create the remote-deployer files with their original filenames, so WAR deployments without a web.xml or context root will have the correct base filename to use as the deployed context
Added:
geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/
geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/
geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/
geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml (with props)
Modified:
geronimo/server/branches/2.0/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java
Modified: geronimo/server/branches/2.0/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java?rev=567934&r1=567933&r2=567934&view=diff
==============================================================================
--- geronimo/server/branches/2.0/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java (original)
+++ geronimo/server/branches/2.0/applications/geronimo-remote-deploy/src/main/java/org/apache/geronimo/deployment/remote/FileUploadServlet.java Mon Aug 20 20:47:03 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<fileCount; 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/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml?rev=567934&view=auto
==============================================================================
--- geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml (added)
+++ geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml Mon Aug 20 20:47:03 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Rev: 545320 $ $Date: 2007-06-07 17:33:37 -0400 (Thu, 07 Jun 2007) $ -->
+
+<geronimo-plugin xmlns="http://geronimo.apache.org/xml/ns/plugins-1.2">
+ <name>Geronimo Remote-Deploy Web App (Tomcat)</name>
+ <module-id>${pom.groupId}/${pom.artifactId}/${version}/car</module-id>
+ <category>Core Geronimo</category>
+ <description>
+ The Remote-Deploy application for Geronimo.
+ </description>
+ <url>http://geronimo.apache.org/</url>
+ <author>The Apache Geronimo development community</author>
+ <license osi-approved="true">BSD -- Apache Software License (ASL) 2.0</license>
+ <geronimo-versions>
+ <version>${version}</version>
+ </geronimo-versions>
+ <prerequisite>
+ <id>org.apache.geronimo.configs/tomcat6//car</id>
+ <resource-type>Web Container</resource-type>
+ <description>
+ 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.
+ </description>
+ </prerequisite>
+ <dependency>org.apache.geronimo.configs/j2ee-server//car</dependency>
+ <!-- <source-repository>http://geronimo.apache.org/plugins/geronimo-2.0/repository/</source-repository> -->
+ <!-- <source-repository>http://www.ibiblio.org/maven2/</source-repository> -->
+ <source-repository>http://download.boulder.ibm.com/ibmdl/pub/software/websphere/wasce/plugins-${version}/</source-repository>
+</geronimo-plugin>
Propchange: geronimo/server/branches/2.0/configs/remote-deploy-tomcat/src/main/resources/META-INF/geronimo-plugin.xml
------------------------------------------------------------------------------
svn:eol-style = native