[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: global.jsa


On Fri, Jul 09, 1999 at 07:49:34PM -0400, Carson Reynolds wrote:
> I am attempting to setup some DB connection-pooling code for an application
> that I'm writing with GNUJSP. Does GNUJSP support "global.jsa" files, and if
> it doesn't how would one go about launching code at server start, and having
> JSP files access objects instantiated in that code.

 I don't know what a JSA is, but you can do...

class MyObject
{
	static MyObject instance = null;
	public static MyObject getInstance()
	{
		if(instance==null)
			instance = new MyObject();
		return instance;
	}
}

 ...so the first jsp that request an instance of this object creates it...