I just copied your code into my XSP page for testing, and it works..
You sure, you have all the <xsp:page things correct?

<?xml version="1.0" encoding="UTF-16"?>

<xsp:page
          language="java"
          xmlns:xsp="http://apache.org/xsp";
          xmlns:util="http://apache.org/xsp/util/2.0";
>

<CustomContent>
  <xsp:logic>
    String app_id = <util:get-sitemap-parameter name="app_id"/>;
    String user_id = <util:get-sitemap-parameter name="user_id"/>;
    <val1><xsp:expr>app_id</xsp:expr></val1>
        <val2><xsp:expr>user_id</xsp:expr></val2>
  </xsp:logic>
</CustomContent>

</xsp:page>

--
Are you sure, you have default generator type set to "serverpages",
because in your example attribute "type" is missing..

Maybe you will try without "cocoon:/" as a source of XSP at first..

My sitemap fragment:

<map:match pattern="internal/test/*-*">
  <map:generate type="serverpages" src="serverpages/test.xsp">
    <map:parameter name="user_id" value="{1}"/>
    <map:parameter name="app_id" value="{2}"/>
  </map:generate>
  <map:serialize type="xml"/>
</map:match>


> Hubert,
> Sorry, but that's wrong... you can call <xsp:expr> inside of a <xsp:logic>
> block.
> You can see this kind of things in all cocoon documentation....
You were right.. it works with <xsp:expr> inside <xsp:logic> block..

>
> CDias
> ----- Original Message -----
> From: "Hubert Trzewik" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 20, 2004 4:53 PM
> Subject: Re: Problems passing parameters to XSP
>
>
>> Hi,
>>
>> XSP:EXPR should be outside of XSP:LOGIC block..
>>
>> try:
>>
>> <select>
>>   <xsp:logic>
>>    String app_id = <util:get-sitemap-parameter name="app_id"/>;
>>    String user_id = <util:get-sitemap-parameter name="user_id"/>;
>>   </xsp:logic>
>> END OF XSP:LOGIC BLOCK MOVED HERE
>>
>>    <val1><xsp:expr>app_id</xsp:expr></val1>
>>    <val2><xsp:expr>user_id</xsp:expr></val2>
>> </select>
>>
>> > Hi,
>> > I know that this is a very well documented subject, but I try it, and
>> > doesn't work.
>> >
>> > My pipeline is:
>> >    <map:match pattern="test-*-*">
>> >     <map:generate src="cocoon:/select_bookmark_list.xsp"
>> > strip-root="false">
>> >      <map:parameter name="user_id" value="{1}"/>
>> >      <map:parameter name="app_id" value="{2}"/>
>> >     </map:generate>
>> >     <map:serialize type="xml"/>
>> >    </map:match>
>> >
>> > My xsp file is:
>> >  <select>
>> >   <xsp:logic>
>> >    String app_id = <util:get-sitemap-parameter name="app_id"/>;
>> >    String user_id = <util:get-sitemap-parameter name="user_id"/>;
>> >    <val1><xsp:expr>app_id</xsp:expr></val1>
>> >    <val2><xsp:expr>user_id</xsp:expr></val2>
>> >   </xsp:logic>
>> >  </select>
>> >
>> > The xsp can't pull the parameters. The result is an empty string. I
>> > already try to use the parameters.getParameter("paramname")
>> > but the problem is the same. Can anybody tell me what's wrong here?!
>> >
>> > Thanks,
>> > Carlos Dias
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to