"Azmi, Amir" wrote:
> 
> Cool work Sylvain.
> 
> I was trying to use this ServerPagesAction with the following xsp file,
> 
>         <?xml version="1.0" encoding="ISO-8859-1"?>
> 
>         <xsp:page
>             language="java"
>                   xmlns:xsp="http://apache.org/xsp";
> 
> xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>                   xmlns:action="http://apache.org/cocoon/action/1.0";
> 
>         >
> 
>         <page>
> 
>                 <action:redirect-to uri="http://www.yahoo.com";>
>                         <xsp:attribute
> name="test"><xsp-request:get-parameter name="RU"/></xsp:attribute>
>                 </action:redirect-to>
>         </page>
>      </xsp:page>
> 
> My problem is that I am not able to dynamically provide value for "uri"
> parameter of "<action:redirect-to/>". I tried changing the order of
> logicsheets also. If I check out the java code generated by above xsp
> file I find no code which will add the parameter "test". I have attached
> the generated java code.
> 
> Any clues as to what is going wrong.
> 
> Thanks in advance.
> 
> --Amir
> 

To provide a dynamic value for the URI, use the following construct :
<action:redirect-to>
  <action:param name="uri"><xsp:expr>...code to get
uri...</xsp:expr></action:param>
</action:redirect-to>

And <xsp:attribute> is used to add an attribute in the *produced* XML,
which is not what you want to do here.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to