cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject [c2] problem with content aggregation (fwd)
Date Fri, 04 May 2001 02:03:27 GMT
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: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message