I can't find XSPRequestHelper.setSessionAttribute

I haven't update cvs in more than a week,
but here's what i see in the relavent template:

  <xsl:template match="xsp-session:set-attribute">
    <xsl:variable name="name">
      <xsl:call-template name="value-for-name"/>
    </xsl:variable>
    <xsl:variable name="content">
      <xsl:call-template name="get-nested-content">
        <xsl:with-param name="content" select="."/>
      </xsl:call-template>
    </xsl:variable>
    <xsp:logic>
      request.getSession().setAttribute(
          String.valueOf(<xsl:copy-of select="$name"/>),
          <xsl:copy-of select="$content"/>);
    </xsp:logic>
  </xsl:template>

You certainly should be able to set session attributes.  Try putting
( ) around sReport like <xsp:expr>(sReport)</xsp:expr>

I'm not promising anything, but it works for me.

On Tue, Mar 12, 2002 at 11:14:44AM +0100, Christian Joelly wrote:
> Hello!
> 
> can session attributes only be set through the sitemap? if i look at the
> generated java code, i think it is impossible to set session attributes
> from java variables or from an string object...
> 
> <session:set-attribute 
>name="report"><xsp:expr>sReport</xsp:expr></session:set-attribute>
> 
> XSPRequestHelper.setSessionAttribute(objectModel, String.valueOf("report"), 
>"sReport");
> 
> Chris
> 
> -- 
> KNAPP Logistics Automation  http://www.knapp.com
> Ing. Christian Jölly        Tel/FAX: (++43) 316 / 495 1926 / 495 394
> Günter-Knapp-Straße 5-7     A-8075 Hart bei Graz
> 



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to