Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 19329 invoked from network); 3 Sep 2009 19:58:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 19:58:22 -0000 Received: (qmail 8832 invoked by uid 500); 3 Sep 2009 19:58:21 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 8737 invoked by uid 500); 3 Sep 2009 19:58:21 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 8726 invoked by uid 99); 3 Sep 2009 19:58:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 19:58:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [72.22.94.67] (HELO virtual.halosg.com) (72.22.94.67) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 19:58:10 +0000 Received: (qmail 21549 invoked from network); 3 Sep 2009 14:57:49 -0500 Received: from 38-171-19-72.skybeam.com (HELO ?192.168.3.121?) (72.19.171.38) by halosg.com with (DHE-RSA-AES256-SHA encrypted) SMTP; 3 Sep 2009 14:57:45 -0500 Message-ID: <4AA01FA3.60300@hanik.com> Date: Thu, 03 Sep 2009 13:57:23 -0600 From: Filip Hanik - Dev Lists User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r810132 - /tomcat/tc6.0.x/trunk/STATUS.txt References: <20090901172200.2CB7123888D6@eris.apache.org> <15412A37E8C9574393B24ADD991FAA760B8A9279B8@MERCMBX14.na.sas.com> <25aac9fc0909011433x456fe843h11c6fedd03f2251a@mail.gmail.com> In-Reply-To: <25aac9fc0909011433x456fe843h11c6fedd03f2251a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/01/2009 03:33 PM, sebb wrote: > On 01/09/2009, Larry Isaacs wrote: > >> Hi Filip, >> >> I have a vague recollection about tripping over this issue while working on the Tomcat support in the Eclipse Web Tools Platform. WTP has its own version(s) of VirtualWebappLoader, called WtpWebappLoader, to address it. If I'm recalling the issue correctly, pre-pending "file:/" worked on Windows, but not on Linux since an absolute path ended up as "file://somedir/...". I believe with the change below, pre-pending "file://" will work for Linux, but not for Windows, i.e. "file://C:/somedir/..." is going to have problems. If it helps, I went with the URL form "file:/somedir/..." and used the following code snippet to get it working for Windows and Linux in WtpWebappLoader: >> >> >> String path = file.getAbsolutePath(); >> if (path.startsWith("/")) { >> path = "file:" + path; >> } else { >> path = "file:/" + path; >> } >> if (file.isDirectory()) { >> addRepository(path + "/"); >> > Also, perhaps consider using FileSystem.getPathSeparator() instead of "/" ? > that would not make it a value URL, now would it :) > >> } else { >> addRepository(path); >> } >> >> Cheers, >> >> Larry >> >> >> >> > -----Original Message----- >> > From: fhanik@apache.org [mailto:fhanik@apache.org] >> > Sent: Tuesday, September 01, 2009 1:22 PM >> > To: dev@tomcat.apache.org >> > Subject: svn commit: r810132 - /tomcat/tc6.0.x/trunk/STATUS.txt >> > >> > Author: fhanik >> > Date: Tue Sep 1 17:21:59 2009 >> > New Revision: 810132 >> > >> > URL: http://svn.apache.org/viewvc?rev=810132&view=rev >> > Log: >> > proposal >> > >> > Modified: >> > tomcat/tc6.0.x/trunk/STATUS.txt >> > >> > Modified: tomcat/tc6.0.x/trunk/STATUS.txt >> > URL: >> > http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=810132 >> > &r1=810131&r2=810132&view=diff >> > ======================================================================= >> > ======= >> > --- tomcat/tc6.0.x/trunk/STATUS.txt (original) >> > +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Sep 1 17:21:59 2009 >> > @@ -321,3 +321,25 @@ >> > +1: funkman >> > -1: >> > >> > + >> > +* Fix VirtualWebappClassLoader file directives >> > + Index: java/org/apache/catalina/loader/VirtualWebappLoader.java >> > +=================================================================== >> > +--- java/org/apache/catalina/loader/VirtualWebappLoader.java >> > (revision 810099) >> > ++++ java/org/apache/catalina/loader/VirtualWebappLoader.java >> > (working copy) >> > +@@ -92,9 +92,9 @@ >> > + continue; >> > + } >> > + if (file.isDirectory()) { >> > +- addRepository("file:/" + file.getAbsolutePath() + >> > "/"); >> > ++ addRepository("file://" + file.getAbsolutePath() + >> > "/"); >> > + } else { >> > +- addRepository("file:/" + file.getAbsolutePath()); >> > ++ addRepository("file://" + file.getAbsolutePath()); >> > + } >> > + } >> > + >> > + +1: fhanik >> > + -1: >> > + >> > + >> > >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >> > For additional commands, e-mail: dev-help@tomcat.apache.org >> > >> >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org