cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Niedermeier" <s.niederme...@logabit.com>
Subject [XSP] <expr> not for int?
Date Wed, 02 Apr 2003 09:21:49 GMT
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


Mime
View raw message