[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-cvs
Subject: svn commit: r651176 -
From: reinhard () apache ! org
Date: 2008-04-24 7:13:17
Message-ID: 20080424071317.BF0501A9832 () eris ! apache ! org
[Download RAW message or body]
Author: reinhard
Date: Thu Apr 24 00:13:10 2008
New Revision: 651176
URL: http://svn.apache.org/viewvc?rev=651176&view=rev
Log:
remove the context path and the servlet path from the URI passed to the sitemap \
interpreter
Modified:
cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
Modified: cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-servlet/src/ma \
in/java/org/apache/cocoon/corona/servlet/SitemapServlet.java?rev=651176&r1=651175&r2=651176&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java \
(original)
+++ cocoon/whiteboard/corona/trunk/corona-servlet/src/main/java/org/apache/cocoon/corona/servlet/SitemapServlet.java \
Thu Apr 24 00:13:10 2008 @@ -91,7 +91,7 @@
HttpContextHelper.storeResponse(response, parameters);
ByteArrayOutputStream baos = new ByteArrayOutputStream(8192);
- this.invoke(request.getRequestURI(), parameters, baos);
+ this.invoke(this.calcSitemapRequestURI(request), parameters, baos);
response.setContentType(MimeTypeCollector.getMimeType());
response.setContentLength(baos.size());
@@ -124,6 +124,12 @@
} catch (MalformedURLException e) {
throw new RuntimeException(e);
}
+ }
+
+ private String calcSitemapRequestURI(HttpServletRequest request) {
+ String contextPath = request.getContextPath();
+ String mountPath = request.getServletPath();
+ return request.getRequestURI().substring(contextPath.length() + \
mountPath.length()); }
private synchronized void lazyInitialize(ServletConfig servletConfig) throws \
ServletException {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic