The xsp-logic tag is allowed before the page tag
too.
But in that section should be declared a class or a
method like
String myMethod(){
return "string";
}
This declared method can used in the page
section.
Boris
----- Original Message -----
Sent: Thursday, April 03, 2003 9:10
AM
Subject: Re: [XSP] <expr> not for
int?
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: [EMAIL PROTECTED] >For
additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For
additional commands, e-mail: [EMAIL PROTECTED]
|