cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [c2] problem with content aggregation (fwd)
Date Fri, 04 May 2001 20:36:45 GMT
Donald Ball wrote:
> in the absence of any comments on this, i went ahead and patched it by
> reverting Request.getRequestURI to call getRequestURL on the underlying
> HttpServletRequest object and added a Request.getSitemapURI method.


Now when I automatically build URIs for email messages, they will be
correct again!

> ---------- Forwarded message ----------
> Date: Thu, 3 May 2001 22:03:27 -0400 (EDT)
> From: Donald Ball <>
> To:
> Subject: [c2] problem with content aggregation (fwd)
> okay, i came up with a solution to the problem - i was wrong to blame c2
> for messing with getPathInfo - catalina's request object always returns
> null for this method when i call it! anyway, i added a method to the c2
> Environment and Request objects - getRootRequestURI. a patch is attached
> which implements this for the http implementations (commandline returns
> null). however, i think we should think about coming up with something
> else - Request.getRequestURI is documented to do this:
>      * Returns the part of this request's URL from the protocol
>      * name up to the query string in the first line of the HTTP request.
>      * For example:
> but in actuality, it returns the request URL after the context path has
> been stripped and possibly the URL has been mangled through the sitemap's
> content aggregation system. i would say that getRequestURI should return
> the request URI as returned by the underlying servlet request object, and
> we should add a new method to the Request object to return the c2 sitemap
> URL.
> for example, if my webapp is mounted under /webapp, and my sitemap has the
> following rule:
> <map:match pattern="foo">
>  <map:aggregate>
>   <map:part src="bar" type="serverpages/>
>  </map:aggregate>
> </map:match>
> if i request /webapp/foo, getRequestURI() will return "/webapp/foo",
> getContextPath() will return "/webapp", and calling getSitemapURI() inside
> the "bar" server page will return "bar". calling getSitemapURI() from
> elsewhere in the pipeline will return "foo". thoughts?
> - donald
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message