cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <>
Subject Adding the sitemap path to Cocoon's Request object
Date Sun, 13 Feb 2005 23:12:51 GMT
The fellow readers of my blog might have noticed that pretty much on 
top of my Cocoon rant list is how unnecessarily complex is to build 
relocatable Cocoon applications, that is applications who can work no 
matter how shallow or deep are nested within the Cocoon hierarchy. The 
problem I'm facing is that in order to build relocatable links you 
either have to:

1. resort to strictly relative links, something that quickly becomes 

2. perform string manipulation by substracting request.getSitemapURI() 
from request.getRequestURI(). This is painful and slow in XSLT, as an 
example, and requires two parameters instead than the one you're 
actually looking for (hence being error prone at best);

The solution is technically a piece of cake, and we have been using a 
braindead custom inputmodule exactly for that. However, I feel that 
this data should be available from the Cocoon environment straight 
away, the best place being o.a.c.environment.Request (which will 
provide immediate user access through the RequestInputModule). I am 
very bad in naming stuff, but I would say that something like 
getSitemapPath() could do the trick. Being this a change in the core 
environment API, no matter how harmless, the issue might deserve some 
discussion and a vote. Or a big slap in my face if I'm missing the 
obvious solution. :-)

So, is that only me having to face this issue day in day out?

Gianugo Rabellino
Pro-netics s.r.l. -
Orixo, the XML business alliance:

View raw message