You can put an inner class inside an xsp:logic tag if it appears before your main element, i.e. <page>.
I did this at first. But when I needed the inner class again in another page, I moved it out of the pages and put it in a separate .java file and made sure the resulting .class file was on the classpath. Ed --- From: Mauricio Souza Lima <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Having a function in a XSP. Date: Wed, 20 Feb 2002 14:31:55 -0200 Ed Jenkins wrote: ><snip/> > > > Can I create an inner class with methods inside a XSP? > >Don't think so. All XSP code goes in the resulting Generator's generate() >method. What you should do IMHO is to use helper classes. All xsp:logic tags before the main tag (the first tag after xsp:page, like <page>), are put before de generate() method, so, i think you can do it. But if you want to work with some custom classes inside the xsp, i think that a better pratice, is to create the class outside the xsp page, put it in the WEB-INF/lib on a jar file and them import it inside the xsp page. > >For more information on taglibs, I suggest you to look at the cocoon >builtin >taglibs in the sourcecode. > >-- >Nicola Ken Barozzi [EMAIL PROTECTED] > - verba volant, scripta manent - > (discussions get forgotten, just code remains) >--------------------------------------------------------------------- > Regards... Mauricio Souza Lima Rational Consulting [EMAIL PROTECTED] Rua Helena, 140 / cj. 82 São Paulo - SP - Brazil Fone / Direct: +55 11 3842-7138 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]> _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>