cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Spinetti" <m.spine...@pisa.iol.it>
Subject R: COMPLEX QUESTION
Date Wed, 15 Nov 2000 12:26:52 GMT
According to you I should do a declaration:
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="risposta_meteo.orig.xsl" type="text/xsl"?>
<?xml-stylesheet href="risposta_meteo_wml.xsl" type="text/xsl" media="wap"?>
<xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:esql="http://apache.org/cocoon/SQL/v2">
<xsp:logic>
<![CDATA[
         static Hashtable hashCitta = new Hashtable();
        hashCitta.put("BERGAMO", "LIME");
       hashCitta.put("BOLOGNA", "LIPE");
       ......................................
]]>
</xsp:logic>
<page>
................
The problem is that Cocoon I from mistake.
How can I do?
Marco
m.spinettiĆ²pisa.iol.it


----- Original Message -----
From: Robin Green <greenrd@hotmail.com>
To: <cocoon-users@xml.apache.org>
Sent: Wednesday, November 15, 2000 1:03 PM
Subject: Re: COMPLEX QUESTION


> "Marco Spinetti" <m.spinetti@pisa.iol.it> wrote:
> >I have a complex question according to me enough: in the Servlet exists
the
> >Init function in which a person can insert some functions  which
initialize
> >dates Membership once  only. How can I do that in Cocoon?
> >How I can insert some inizialisment of elements ( to example a
Hashtable )
> >that must be executed an only time? Exists somebody which knows how I can
> >do it? Thanks many for the answer.
>
> It's easy. I'll add this to the FAQ since it's asked a lot.
>
> Just put this outside your page root element, but inside your xsp:page
> element:
>
> <xsp:logic>
>   // declare any "permanent" variables here, e.g.
>   Collection myDates;
>
>   {
>     myDates = // initialize my dates here, this is executed only once
>   }
> </xsp:logic>
>
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
> ---------------------------------------------------------------------
> 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