On 5/4/07, Rice Yeh <riceyeh@gmail.com> wrote:
On 5/3/07, Grzegorz Kossakowski <gkossakowski@apache.org > wrote:
Rice Yeh napisał(a):
> Your answer seems to be what I need. But I am confused with how
> 'servlet://' in dojo.registerModulePath("cocoon.ajax",
> "servlet://resource/external/ajax/js") in manifest.js is translated?

It is translated by servletLinkRewriter reader. Take a look at this sitemap to see how it's done:

What about a script statement in a .jx file like this one

<script language="text/javascript" src="servlet:commons:xs/manifest.js"/>

Is there a transformer for link rewriting?

Yes, there is one. I find an example at https://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-sample/src/main/resources/COB-INF/sitemap.xmap



Basically you don't need to bother what will be result of rewriting, all you have to now that servlet://** link will be
seen by sitemap matching such a request as {1}.

Grzegorz Kossakowski