cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Rolappe" <m_rola...@web.de>
Subject AW: custom java method within XSP
Date Wed, 07 May 2003 08:35:21 GMT
hi thorsten,

the <xsp:logic> element defining the method must be a direct child of the
<xsp:page> element, just like the <xsp:structure> element. in your case the
<xsp:logic> is transformed to code within the generator's generate() method
assuming it will contribute to generation. this of course doesn't work in
this case; your code fragment is supposed to be part of the class
definition, not the generate() method.

HTH

> -----Ursprüngliche Nachricht-----
> Von: cocoon-users-return-50236-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-50236-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Scherler, Thorsten
> Gesendet: Dienstag, 6. Mai 2003 17:12
> An: Cocoon-Users (E-Mail)
> Betreff: custom java method within XSP
>
>
> Hello group,
>
> I would like to use a Java method within my xsp. It is not working!
>
> Code:
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> 	<xsp:structure>
> 		<xsp:include>java.util.*</xsp:include>
> 		<xsp:include>java.text.*</xsp:include>
> 	</xsp:structure><!-- -->
> <list>
> <xsp:logic>
>  private static String getParameter(String input)
>   {
>     if(input == null || input.equals(""))
>       return "";
>     else return input;
>   }
> </xsp:logic>
> <p>
> test
> </p>
> </list>
> </xsp:page>
>
> Error:
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error
> compiling update_all_xsp: Line 287, column 1: illegal start of
> expression Line 0, column 0: 1 error
>
> Using:
> cocoon 2.04
>
> > Mit freundlichem Gruss,
> >
> > Thorsten Scherler
> > Marketing / Telefonmarketing
> >
> > Weidmüller GmbH & Co.
> > P.O. Box 2807
> > 33058 Paderborn
> > Tel.:+ 49 - 5252-960-350
> > Fax:+ 49 - 5252-960-116
> > eMail: thorsten.scherler@weidmueller.de
> > http://www.weidmueller.de
> >
> >
>
> ---------------------------------------------------------------------
> 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