Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 31471 invoked from network); 18 Jan 2000 23:49:04 -0000 Received: from florentine.cactuscom.com (HELO florentine.cactuscom.ca) (206.108.58.3) by 63.211.145.10 with SMTP; 18 Jan 2000 23:49:04 -0000 Received: by florentine.cactuscom.com with Internet Mail Service (5.5.2650.21) id ; Tue, 18 Jan 2000 18:46:56 -0500 Message-ID: From: Philippe Lavoie To: "Cocoon (E-mail)" Subject: [Bugfix] Relative path problem under JRun Date: Tue, 18 Jan 2000 18:46:55 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" As mentionned in the mailing list, there is a problem in determining the relative path of a file with JRun with the following patch it works. I have absolutely no clue why the new code doesn't work properly. Because the more I look at the solution, the less I see differences. Perhaps someone can show me the difference between the two versions of that piece of code? Anyway, with that fix you can add JRun2.3.3 under windows NT as a supported platform for 1.6. Phil *** ProducerFromFile.java Tue Jan 18 18:45:40 2000 --- ProducerFromFile.java~ Tue Jan 18 14:25:20 2000 *************** public class ProducerFromFile extends Ab *** 107,122 **** } } catch (NoSuchMethodError e) { // if there is no such method we must be in Servlet API 2.1 ! return ((request.getPathInfo() == null) ! ? request.getRealPath(request.getRequestURI()) ! : request.getPathTranslated()).replace('\\','/'); ! } catch (MalformedURLException e) { throw new RuntimeException("Malformed request URL."); } catch (NullPointerException e) { // if there is no context set, we must be called from the command line return request.getPathTranslated().replace('\\','/'); } - } public String getStatus() { --- 107,125 ---- } } catch (NoSuchMethodError e) { // if there is no such method we must be in Servlet API 2.1 ! if (request.getPathInfo() != null) { ! // this must be Apache JServ ! return request.getPathTranslated().replace('\\','/'); ! } else { ! // otherwise use the deprecated method on all other servlet engines. ! return request.getRealPath(request.getRequestURI()); ! } ! } catch (MalformedURLException e) { throw new RuntimeException("Malformed request URL."); } catch (NullPointerException e) { // if there is no context set, we must be called from the command line return request.getPathTranslated().replace('\\','/'); } }