you can use application.setAttribute("variablename", Object value);
 
ie Integer globalVariable = new Integer(15);
application.setAttribute("global", globalVariable);
 
to retrieve it you would
 
Integer globalVariable = (Integer)application.getAttribute("global");
 
etc.. this can be passed on between pages
 
Regard,
 
Pete Dolukhanov
----- Original Message -----
Sent: Wednesday, December 19, 2001 10:18 PM
Subject: external variable

Hi all,
 
Is there a way I can define an external variable that can be accessed from any other method I define in a JSP?
 
I want to create a method that prints something, but I don't want to pass the 'out' variable as a parameter. I want to copy it to a 'global' variable, so I can call it from within the other method.
 
Thanks for your help!
 
Luis Javier

Reply via email to