Christian Haul wrote:
On 21.Jan.2003 -- 05:35 PM, Torsten Curdt wrote:Thinking further about this, we have to define carefully how this relates to the "cocoon:" protocol, because in such a case we have _two_ request paths :
I couldn't really think of anything else yet..sure - will do...What's the need for an environment input module besides getting the current uri prefix ?
Remember that environment is an internal object used by the pipeline system (sitemap + pipeline implementations) that isn't visible from other classes.Something like that was also my first thought... just hesitated to propose a change/addition of the Request interface ...since I only need it inside the sitemap - so I came up with the idea of the environment module.
I also recently needed to get the uri-prefix, and was thinking of adding a new getSitemapPath() to Request, that would complement getContextPath() with the current uri prefix.
Thoughts ?
Shall we add it to the Request?
Sounds even better.
- the protocol-level path, accessible using getRequestURI(),
- the sitemap-level path, accessible using getSitemapURI() (different from the above in the case of a mount or "cocoon:")
We also have to consider that, through getSitemapURI(), the "getSitemapXxx" names are tied to the current sitemap request (i.e. the "cocoon:" one).
IMO, the use case is more related to the protocol-level URI : I had the need for this when building links to images located at the root of the current sitemap from an abitrarily nested URI (see [1] and search for "{request:contextPath}/mount/cvssource").
But this is only my view of the problem. Any other use case ?
We also have to consider how to handle the interface change :
- on 2.1, no problem : we're not even alpha ;-)
- on 2.0, there can be some backwards compatibility for people having implemented their own Request without extending one of the provided classes. Are there many of them ? I would say no, but if there are, please stand up !
Sylvain
[1] http://cvs.cocoondev.org/cgi-bin/viewcvs.cgi/cvssource/src/samples/cvssource/sitemap.xmap?rev=1.1&cvsroot=cvssource&content-type=text/vnd.viewcvs-markup
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]