cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enke, Michael" <michael.e...@wincor-nixdorf.com>
Subject Re: XSP bug: can get generate() to skip elements using java 'if's
Date Tue, 10 Sep 2002 06:57:52 GMT
Per Kreipke wrote:
> 
> The following XSP snippet will cause an ArrayIndexOutOfBoundsException in
> Cocoon 2.0.3 because the start of the outer element is never emitted to the
> SAX stream.
> 
> XSP Snippet:


I would always write it as:

 <xsp:page ....>
 
  <page>
   <xsp:logic>
     if (!request.isUserInRole("root"))
     {
       <xsp:attribute name="security-error">Not authorized</xsp:attribute>
     }
     else
     {
   <xsp:content>
 
     <!-- Build the page if authorized -->
     <content />
 
   </xsp:content>
     }
   </xsp:logic>
  </page>
 
 </xsp:page>
 
note: </xsp:logic> replaced by <xsp:content>
and <xsp:logic> replaced by </xsp:content>

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message