cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MORÁVEK Peter <mora...@pobox.sk>
Subject response taglib bug
Date Fri, 12 Jan 2001 18:21:08 GMT
Hello,

I'm using Cocoon 1.8 and I have found this bug:

if I write this to my xsp page:
<response:set-header name="Cache-Control" value="no-cache"/>

it is converted to this java source code:

     response.setIntHeader(
       String.valueOf("Cache-Control"),
       Integer.parseInt(
         String.valueOf("no-cache")
       )
     );

The solution (I think) is to remove this template from response.xsl:

  <xsl:template match="response:add-header">
    <xsl:variable name="name">
      <xsl:call-template name="value-for-name"/>
    </xsl:variable>

    <xsl:variable name="value">
      <xsl:choose>
        <xsl:when test="@value">"<xsl:value-of select="@value"/>"</xsl:when>
        <xsl:when test="value">
          <xsl:call-template name="get-nested-content">
            <xsl:with-param name="content" select="value"/>
          </xsl:call-template>
        </xsl:when>
      </xsl:choose>
    </xsl:variable>

    <xsp:logic>
      response.addIntHeader(
       String.valueOf(<xsl:copy-of select="$name"/>),
       Integer.parseInt(
         String.valueOf(<xsl:copy-of select="$value"/>)
       )
     );
    </xsp:logic>
  </xsl:template>

Please do the change in cvs...

Thanks in advance 

Peter

Mime
View raw message