cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: [cocoon 2.2.x] how to get request params in called block?
Date Tue, 31 Jul 2007 19:15:00 GMT
xweber pisze:
> hi,
> i want to deal e.g. html POST parameters in the called block. The sitemap in
> myBlock1 has something like:
> <map:generate src="servlet:myBlock2:/dosomeprocessing"/> 
> but unfortunatly in the called block all parameters are gone.

It's a known problem and limitation of current implementation. See COCOON-2050[1] for some
Alex, actually I recommend you taking a look at JIRA page[2] for Servlet Service framework
issues overview. This will give an idea what's 
already there and what's not.

Also, voting for particular issues can speed up process of implementing them. Of course you
should choose issues carefully, voting for all 
of them will not help us anyhow. Speaking about myself, I would be very happy to work on all
these issues but currently I'm busy with my 
Google of Summer tasks that have highest priority.

> so, how to get request params in called block?

If parameters are simple strings you can pass them using such construct:

Of course, such solution has it's own limitations but may be sufficient in many situations.

As you want to use some pipeline for processing XML stream I think that the best way would
be to use servletService transformer.
You need your XML data in the pipeline, so you should use:
<map:generate type="stream">
   <map:parameter name="form-name" value="name_of_request_parameter"/> <!-- the name
'form-name' is rather misleading -->

And then you should use servletService transformer:
<map:transform type="servletService">
   <map:parameter name="service" value="servlet:myBlock2:/dosomeprocessing"/>

> Alex
> PS: is there any "pure" cocoon 2.2 project out there, so i could get a sneak
> peak how to put all things together?

Unfortunately, not yet. I'm working on such project, but as I said above, GSoC is more important
for me now.


Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message