You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Zachariah <zb...@unl.edu> on 2006/11/28 00:05:40 UTC
Trouble pushing parameters with spaces to file generator src
Hi everyone, I'm a newbie here.
What I'm trying to do is quite simple, but I don't know how to track down
the error.
All I want to do is pass a search phrase to an external file that will
return generated XML. I'm doing this as so:
<map:generate
src="http://www.searchserver.com/search.php?keyword={raw-request-param:keyword}"
/>
The problem is if the search phrase contains a space like
mysearch?keyword=north+america or mysearch?keyword=north%20america, only the
first word is passed through. So in this example the result would be
equivalent to mysearch?keyword=north.
If I just do a straight redirect it work perfectly, like so:
<map:redirect-to
uri="http://www.searchserver.com/search.php?keyword={raw-request-param:keyword}"/>
but I don't want to direct users to a different host.
Any ideas are appreciated.
--
View this message in context: http://www.nabble.com/Trouble-pushing-parameters-with-spaces-to-file-generator-src-tf2714989.html#a7569991
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Trouble pushing parameters with spaces to file generator src
Posted by Zachariah <zb...@unl.edu>.
Thank you for the fast reply.
I changed:
<map:generate
src="http://www.searchserver.com/search.php?keyword={raw-request-param:keyword}"
/>
to:
<map:generate
src="http://www.searchserver.com/search.php?{request:queryString}" />
and now it works correctly.
Ard Schrijvers wrote:
>
>>
>>
>> Hi everyone, I'm a newbie here.
>> What I'm trying to do is quite simple, but I don't know how
>> to track down
>> the error.
>>
>> All I want to do is pass a search phrase to an external file that will
>> return generated XML. I'm doing this as so:
>>
>> <map:generate
>> src="http://www.searchserver.com/search.php?keyword={raw-reque
>> st-param:keyword}"
>> />
>>
>> The problem is if the search phrase contains a space like
>> mysearch?keyword=north+america or
>> mysearch?keyword=north%20america, only the
>> first word is passed through. So in this example the result would be
>> equivalent to mysearch?keyword=north.
>
> But when having a form input field for a search, you probably get
> north+america. Isnt that enough? Otherwise, try a post instead of a get,
> and try to use raw-request-param, or request-param, or
> request:queryString, or urlencode the request
>
> Regards Ard
>
>>
>> If I just do a straight redirect it work perfectly, like so:
>>
>> <map:redirect-to
>> uri="http://www.searchserver.com/search.php?keyword={raw-reque
>> st-param:keyword}"/>
>>
>> but I don't want to direct users to a different host.
>>
>
--
View this message in context: http://www.nabble.com/Trouble-pushing-parameters-with-spaces-to-file-generator-src-tf2714989.html#a7580674
Sent from the Cocoon - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org