cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
Subject Re: [XSP] <expr> not for int?
Date Thu, 03 Apr 2003 07:10:23 GMT
the <xsp:logic> tag should be between the <page> tag.

Lionel



At 11:21 02/04/2003 +0200, you wrote:
>Hello,
>
>the following XSP causes an LanguageException:
>
><?xml version="1.0" ?>
>
><xsp:page language="java"
>  xmlns:xsp="http://apache.org/xsp">
>
>  <xsp:logic>
>   int value = 1;
>   value = value + 1;
>  </xsp:logic>
>
>  <page>
>   <title>PageTitle</title>
>   <content>
>    1 + 1 = <xsp:expr>value</xsp:expr>
>   </content>
>  </page>
></xsp:page>
>
>The exception says:
>
>org.apache.cocoon.components.language.LanguageException: Error compiling
>xsptest_xsp:
>Line 69, column 22: <identifier> expected
>Line 69, column 16: class value not found in class
>org.apache.cocoon.www.xsptest_xsp
>Line 0, column 0:
>2 errors
>
>After changing the type from int to String, the XSP works:
>
><?xml version="1.0" ?>
>
><xsp:page language="java"
>  xmlns:xsp="http://apache.org/xsp">
>
>  <xsp:logic>
>   String value = "1";
>   value = "2";
>  </xsp:logic>
>
>  <page>
>   <title>PageTitle</title>
>   <content>
>    1 + 1 = <xsp:expr>value</xsp:expr>
>   </content>
>  </page>
></xsp:page>
>
>Why? Doesn't <xsp:expr> automatically convert int to String?
>
>Thank you!
>
>Regards
>Stephan
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


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


Mime
View raw message