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();
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.