cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bierenfeld <michael.bierenf...@atmiralis.de>
Subject Re: xsp and cookie setting problem
Date Wed, 20 Sep 2000 09:53:25 GMT
Matthew Smith wrote:
> 
>         I've got the following in a logicsheet:
> 
>   <xsl:template match="util:set-cookie">
>         <xsp:logic>
>             private static void setCookie(String cookiename, String cookievalue)
>             {
>                 Cookie cookie = new Cookie(cookiename,cookievalue);
>                 cookie.setMaxAge(3600);
>                 response.addCookie(cookie);
>             }
>         </xsp:logic>
>         <xsp:expr>
>                 setCookie("<xsl:value-of select="@name" />","<xsl:value-of select="@value"
> />")
>     </xsp:expr>
>   </xsl:template>
> 
>         The rest of the logicsheet, including other tags in the namespace util,
> works fine.  When I try to process an xml document that uses this tag I get
> the following error:
> java.lang.Exception: XSP Java Compiler: Compilation failed for _model.java
> 35: Undefined variable or class name: response
>                 response.addCookie(cookie);
>                 ^
> 1 error
> 
>         The XSP documentation says that response is a built in object for xsp
> pages.  So, what am I doing wrong?
> 
> Thanks,
> Matt
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Hello,

check out the generated java code. Where this code
is located is specified in cocoon.properties.
Maybe you did a typo.

Regards

Michael

Mime
View raw message