RE: The class variable reference null problem

2007-06-01 Thread Dave Newton
--- Kapil Sharma <[EMAIL PROTECTED]> wrote: > public class ClsAction extends Action { > public static GraphicsServer myServer = null; > Actionforward execute(){ > if(myServer == null) > myServer = > ClsInitializeServer.getInitializeInstance(); >} > } Just make sure this

RE: The class variable reference null problem

2007-05-31 Thread Kapil Sharma
CTED] Sent: Friday, June 01, 2007 11:33 AM To: Struts Users Mailing List Subject: RE: The class variable reference null problem I tried your method , debug the program , it shows that the variable becomes null, But after login in again the "public static Graphics

RE: The class variable reference null problem

2007-05-31 Thread Kapil Sharma
--Original Message- From: Fei Fei [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 11:06 AM To: Struts Users Mailing List Subject: RE: The class variable reference null problem you can try to do something like this: public class ClsAction extends Action { // Start Intialize the

RE: The class variable reference null problem

2007-05-31 Thread Fei Fei
you can try to do something like this: public class ClsAction extends Action { // Start Intialize the instance of the graphics serverpublic Object lockObj = new Object();public static GraphicsServer myServer = ClsInitializeServer.getInitializeInstance(); // End