You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by da...@apache.org on 2006/02/08 23:05:28 UTC
svn commit: r376095 -
/cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
Author: danielf
Date: Wed Feb 8 14:05:24 2006
New Revision: 376095
URL: http://svn.apache.org/viewcvs?rev=376095&view=rev
Log:
Servlet context relative paths must start with '/', but the sitemap engine doesn't like that.
Now the block samples should work again.
Modified:
cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
Modified: cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java?rev=376095&r1=376094&r2=376095&view=diff
==============================================================================
--- cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java (original)
+++ cocoon/trunk/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/sitemap/SitemapServlet.java Wed Feb 8 14:05:24 2006
@@ -99,7 +99,13 @@
} catch (ConfigurationException e) {
throw new ServletException("Faulty sitemap configuration ", e);
}
-
+
+ // FIXME: All context relative paths are supposed to start with '/' but of some
+ // reason that doesn't work for the sitemap engine, or maybe a different covention
+ // applies there.
+ if (sitemapPath != null && sitemapPath.charAt(0) != '/')
+ sitemapPath = "/" + sitemapPath;
+
Context context = CoreUtil.createContext(config, core.getSettings(), sitemapPath);
this.contextURL = CoreUtil.getContextURL(this.getServletContext(), sitemapPath);