You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Anna Afonchenko <an...@ubaccess.com> on 2003/03/12 14:44:59 UTC
Problem with "request parameters"
Hi all
I have a pipeline that processes some url.
<map:match pattern="testing/**>
<map:generate src=http://{1} type="html"/>
<map:transform src="ub/testing/test.xsl"/>
<map:serialize type="xml"/>
</map:match>
I.e. I get some html page, generate it, run an xsl and serialize. Nothing complicated.
I can make a request localhost:8080/cocoon/testing/www.cnn.com/search.html (or whatever) and it works fine.
The problem arises when the requested URL contains question marks, as in www.some.com/index.asp?id=15
If I provide this URL for the above pipeline, it generates the URL www.some.com/index.asp, ignoring everything after the ?. I understand that this is because Cocoon treats everything after ? as request parameters to the pipeline, but this is not the case here.
So my question is how can I define Cocoon to take into the generator the full URL including the ? and everything after it. Is it at all possible?
I would appreciate any input.
Thank you very much for help.
Anna
Re: Problem with 'request parameters'
Posted by Anna Afonchenko <an...@ubaccess.com>.
Thank you Michael.
Actually, I just need to write {../1}{requestQuery} instead of
{1}{requestQuery}
Thanks for your help.
Anna
----- Original Message -----
From: <ml...@editronics-edu.fr>
To: <co...@xml.apache.org>
Sent: Wednesday, March 12, 2003 4:18 PM
Subject: Re: Problem with 'request parameters'
Hi !
I think you can try this :
<map:match pattern="testing/**>
<map: act type="request">
<map:generate src="http://{1}{requestQuery}" type="html"/>
<map:transform src="ub/testing/test.xsl"/>
<map:serialize type="xml"/>
</map:act>
</map:match>
if you have this in your sitemap
<map:actions>
<map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"/>
</map:actions>
{requestQuery} will contain the string "?id=15".
Michael
> Hi all
> I have a pipeline that processes some url.
> <map:match pattern="testing/**>
> <map:generate src=http://{1} type="html"/>
> <map:transform src="ub/testing/test.xsl"/>
> <map:serialize type="xml"/>
> </map:match>
>
> I.e. I get some html page, generate it, run an xsl and serialize.
> Nothing complicated. I can make a request
> localhost:8080/cocoon/testing/www.cnn.com/search.html (or whatever) and
> it works fine. The problem arises when the requested URL contains
> question marks, as in www.some.com/index.asp?id=15 If I provide this URL
> for the above pipeline, it generates the URL www.some.com/index.asp,
> ignoring everything after the ?. I understand that this is because
> Cocoon treats everything after ? as request parameters to the pipeline,
> but this is not the case here.
>
> So my question is how can I define Cocoon to take into the generator the
> full URL including the ? and everything after it. Is it at all possible?
>
> I would appreciate any input.
> Thank you very much for help.
>
> Anna
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: Problem with 'request parameters'
Posted by ml...@editronics-edu.fr.
Hi !
I think you can try this :
<map:match pattern="testing/**>
<map: act type="request">
<map:generate src="http://{1}{requestQuery}" type="html"/>
<map:transform src="ub/testing/test.xsl"/>
<map:serialize type="xml"/>
</map:act>
</map:match>
if you have this in your sitemap
<map:actions>
<map:action name="request"
src="org.apache.cocoon.acting.RequestParamAction"/>
</map:actions>
{requestQuery} will contain the string "?id=15".
Michael
> Hi all
> I have a pipeline that processes some url.
> <map:match pattern="testing/**>
> <map:generate src=http://{1} type="html"/>
> <map:transform src="ub/testing/test.xsl"/>
> <map:serialize type="xml"/>
> </map:match>
>
> I.e. I get some html page, generate it, run an xsl and serialize.
> Nothing complicated. I can make a request
> localhost:8080/cocoon/testing/www.cnn.com/search.html (or whatever) and
> it works fine. The problem arises when the requested URL contains
> question marks, as in www.some.com/index.asp?id=15 If I provide this URL
> for the above pipeline, it generates the URL www.some.com/index.asp,
> ignoring everything after the ?. I understand that this is because
> Cocoon treats everything after ? as request parameters to the pipeline,
> but this is not the case here.
>
> So my question is how can I define Cocoon to take into the generator the
> full URL including the ? and everything after it. Is it at all possible?
>
> I would appreciate any input.
> Thank you very much for help.
>
> Anna
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org