You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kapil Sharma <ka...@iap-online.com> on 2007/06/01 03:51:14 UTC

The class variable reference null problem

Hi,

I have one problem

In my action class , I am initilazing my graphic software server as a static
variable e.g.

public class ClsAction extends Action {

	
	// Start Intialize the instance of the graphics server

	public static GraphicsServer myServer =
ClsInitializeServer.getInitializeInstance();

	// End 

	another methods(){
		. . . 
		}


}

The code is executing perfectly OK, But I am not able to make "myserver"
object reference null when logging out of the application.

I tried calling the "myServer = null", but the next time I come to this java
class the "public static GraphicsServer myServer =
ClsInitializeServer.getInitializeInstance();"

does not seem to exceute, but is available to other parts of the program. I
think in struts it becomes the application level variable and does not null.
I am new , Plz help me how to make its reference null.


Thanks and Regards,
Kapil Sharma