cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: [C2] Sitemap URL manipulation - XSP caching
Date Tue, 12 Sep 2000 12:43:37 GMT

--- Andre Schmidt <> wrote:
> I want to mask my database access through the URL. So I came down
> with the
> following definition in my sitemap:
>    <map:match pattern="mypath/item-RH-C2/*.xml">
>     <map:generate type="serverpages"
> src="mypath/item-RH-C2.xml?ucid={1}"/>
>     ...
>    </map:match>
> But I'm getting an IOException at
> Can't read file: ... mypath/item-RH-C2.xml?ucid=123.
> Is this an undefined situation for sitemap? Is there another way to
> do this
> kind of URL rewriting (I'm running pure Tomcat at the moment, no
> Apache...)

At the moment the value from the src= attribute is interpreted as a
file name. There is no URI rewriting capabilities.

> Another question is about XSP caching. In the former scenario the
> page will
> be cached, but not the instances for different database items. Is
> there are
> way around that?

There is no caching implemented in C2. Remind that sitemap components
are instantiated for each request because of the SAX model. It doesn't
allow (or only really hard) writing thread safe objects. And most of
the time ThreadLocal will be too heavy to use for those simple objects.
But as soon as the new AvalonAware release can be integrated into C2 we
will have Interfaces to mark sitemap components as ThreadSafe,
Recyclable and Poolable to make the engine know how to handle
individual sitemap components. The Cocoon ComponentManager will benefit
from those Interfaces as well to serve components the right way.


PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
Hintereichenstrasse 7           
CH-8166 Niederweningen                    Web:

Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!

View raw message