You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Newland <ch...@yahoo.co.uk> on 2000/05/16 15:42:49 UTC

xsp equivalent of JSP bean "application scope"

Hi, 

Is there a way of making variables in XSP pages in
scope for the entire duration of the cocoon server?

I've tried:

<xsp:logic>
private static boolean _run_once = false;
</xsp:logic>

<page title="Welcome">
<xsp:logic>
if (_run_once == false) {
_users	= new Vector();
_run_once = true;
}

...
</page>

but if I press refresh on the browser then _run_once
is set to false again (which causes my run-once region
to be executed again)

Is this happening because my XSP is recompiled when
the page is fetched again?

Thanks for your help

Chris

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie