Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 39994 invoked from network); 4 Dec 2009 12:23:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 12:23:41 -0000 Received: (qmail 22262 invoked by uid 500); 4 Dec 2009 12:23:41 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 22200 invoked by uid 500); 4 Dec 2009 12:23:41 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 22191 invoked by uid 99); 4 Dec 2009 12:23:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 12:23:41 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 12:23:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 797B023889DA; Fri, 4 Dec 2009 12:23:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r887169 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java Date: Fri, 04 Dec 2009 12:23:19 -0000 To: commits@sling.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091204122319.797B023889DA@eris.apache.org> Author: fmeschbe Date: Fri Dec 4 12:23:18 2009 New Revision: 887169 URL: http://svn.apache.org/viewvc?rev=887169&view=rev Log: SLING-1219 Fix description of test entry field and ensure map(String) is called if the user provided just a path. Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java?rev=887169&r1=887168&r2=887169&view=diff ============================================================================== --- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java (original) +++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverWebConsolePlugin.java Fri Dec 4 12:23:18 2009 @@ -114,7 +114,13 @@ titleHtml( pw, "Configuration Test", - "To test the configuration, enter an URL or a resource path into the field and click 'Resolve' to resolve the URL or click 'Map' to map the resource path"); + "To test the configuration, enter an URL or a resource path into " + + "the field and click 'Resolve' to resolve the URL or click 'Map' " + + "to map the resource path. To simulate a map call that takes the " + + "current request into account, provide a full URL whose " + + "scheme/host/port prefix will then be used as the request " + + "information. The path passed to map will always be the path part " + + "of the URL."); pw.println(""); pw.println("Test"); @@ -180,7 +186,11 @@ // map or resolve as instructed Object result; if ("Map".equals(request.getParameter(ATTR_SUBMIT))) { - result = resolver.map(helper, helper.getPathInfo()); + if (helper.getRemoteHost() == null) { + result = resolver.map(helper.getPathInfo()); + } else { + result = resolver.map(helper, helper.getPathInfo()); + } } else { result = resolver.resolve(helper, helper.getPathInfo()); }