You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/12/20 10:27:35 UTC

svn commit: r605844 - /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java

Author: andreas
Date: Thu Dec 20 01:27:34 2007
New Revision: 605844

URL: http://svn.apache.org/viewvc?rev=605844&view=rev
Log:
Use servlet helper to obtain webapp URL from request. This should fix bug 44111.

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java?rev=605844&r1=605843&r2=605844&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingFallbackSourceFactory.java Thu Dec 20 01:27:34 2007
@@ -41,10 +41,10 @@
 import org.apache.lenya.cms.publication.DocumentFactory;
 import org.apache.lenya.cms.publication.DocumentUtil;
 import org.apache.lenya.cms.publication.Publication;
-import org.apache.lenya.cms.publication.PublicationManager;
 import org.apache.lenya.cms.publication.URLInformation;
 import org.apache.lenya.cms.publication.templating.AllExistingSourceResolver;
 import org.apache.lenya.cms.publication.templating.PublicationTemplateManager;
+import org.apache.lenya.util.ServletHelper;
 
 /**
  * Aggregate all existing fallback URIs by merging their XML content under
@@ -92,9 +92,7 @@
             Request request = ContextHelper.getRequest(this.context);
 
             if (publicationId == null) {
-                String webappUrl = request.getRequestURI().substring(
-                        request.getContextPath().length());
-
+                String webappUrl = ServletHelper.getWebappURI(request);
                 URLInformation info = new URLInformation(webappUrl);
                 publicationId = info.getPublicationId();
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org