You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Anoop Aryal <aa...@foresightint.com> on 2003/08/01 03:28:13 UTC

request parameters..

hi, new to cocoon. looking at a couple of books and the example sitemap.
but what i can't figure out for the life of me is how to get at the
request parameters that i get in a GET request (it could be POST as
well). and propagate it in the cocoon:// protocol.

i have something like this..

(i know some of these need to be resources.. but i need them public for
right now)

--------------- sitemap snippet --------------

<map:match type="wildcard" pattern="one.xml">
<map:generate type="customGeneratorTypeOne"/>
</map:match>

<map:match type="wildcard" pattern="two.xml">
<map:generate type="customGeneratorTypeTwo"/>
</map:match>

<map:match type="wildcard" pattern="combined.xml">
  <map:aggregate>
    <map:part src="cocoon://one.xml"/>
    <map:part src="cocoon://two.xml"/>
  </map:aggregate>
  <map:transform type="xslt" src="combined.xsl">
  <map:serialize type="xml"/>
</map:match>

--------------- end sitemap snippet --------------


now, when i pass combined two parameters as such:
http://whathaveyou:8080/cocoon/combined.xml?oneParam=1&twoParam=2
i need those available to the corrseponding generators as parameters

any ideas?

thanks,
anoop.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: request parameters..

Posted by Upayavira <uv...@upaya.co.uk>.
On 31 Jul 2003 20:28:13 -0500, "Anoop Aryal" <aa...@foresightint.com>
said:
> hi, new to cocoon. looking at a couple of books and the example sitemap.
> but what i can't figure out for the life of me is how to get at the
> request parameters that i get in a GET request (it could be POST as
> well). and propagate it in the cocoon:// protocol.
> 
> i have something like this..
> 
> (i know some of these need to be resources.. but i need them public for
> right now)

You can use the request parameter input module, like so:

 <map:match pattern="foo.html">
   <map:generate src="foo"/>
   <map:transform src="foo.xsl">
     <map:parameter name="foo" value="{request-param:foo}"/>
   </map:transform>
   <map:serialize/>
  </map:match>

HTH.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: request parameters..

Posted by Alexandre Victoor <al...@fr.adp.com>.
Hi
You should look in the mailing list archives at the msgs dealing with 
"request-param"
Hope it helps

Alex

At 20:28 31/07/2003 -0500, you wrote:
>hi, new to cocoon. looking at a couple of books and the example sitemap.
>but what i can't figure out for the life of me is how to get at the
>request parameters that i get in a GET request (it could be POST as
>well). and propagate it in the cocoon:// protocol.
>
>i have something like this..
>
>(i know some of these need to be resources.. but i need them public for
>right now)
>
>--------------- sitemap snippet --------------
>
><map:match type="wildcard" pattern="one.xml">
><map:generate type="customGeneratorTypeOne"/>
></map:match>
>
><map:match type="wildcard" pattern="two.xml">
><map:generate type="customGeneratorTypeTwo"/>
></map:match>
>
><map:match type="wildcard" pattern="combined.xml">
>   <map:aggregate>
>     <map:part src="cocoon://one.xml"/>
>     <map:part src="cocoon://two.xml"/>
>   </map:aggregate>
>   <map:transform type="xslt" src="combined.xsl">
>   <map:serialize type="xml"/>
></map:match>
>
>--------------- end sitemap snippet --------------
>
>
>now, when i pass combined two parameters as such:
>http://whathaveyou:8080/cocoon/combined.xml?oneParam=1&twoParam=2
>i need those available to the corrseponding generators as parameters
>
>any ideas?
>
>thanks,
>anoop.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org