cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huib Verweij <>
Subject Calling servlet block from itself?
Date Thu, 31 Mar 2011 11:04:02 GMT

I would like to call a servlet from within a servlet, e.g.:

<map:transform type="servletService">
    <map:parameter name="service"  value="servlet:db:/workspace/getSortOrders.xml"/>

from within the db-servlet itself. I realize this is somewhat like a recursive call and it
could lead to unpleasant behavior. I also realize I have setup my blocks incorrectly and probably
need to create more blocks, pushing the code I want to call to the basic 'bottom' block. But
it would help for now if this is possible :-).

The above statement fails, so I tried to add:

        <entry key="db" value-ref=""/>
        <entry key="display" value-ref=""/>

to the servlet context for db:

<servlet:context mount-path="/db" context-path="blockcontext:/db/"/>

but then things fail to startup properly.

So, it's not that I can't imagine why this is tricky, but on the other hand I can see this
might be useful. An alternative I see would be to use a <map:resource/> but unfortunately
the code I'm trying to call is in a different sitemap.xmap. Any suggestions are appreciated.

Hartelijke groet,


Drs. Huib Verweij
Senior software developer - The Language Archive
Max Planck Institute for Psycholinguistics
P.O. Box 310
6500 AH Nijmegen
The Netherlands
t +31-24-3521911

View raw message