How about Servlet Context, or Session?  Context would be the most logical
place for it.

-----Original Message-----
From: John Moore [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 30, 2003 10:32 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: Re: Accessing objects with any servlets, where the object is
already pre-created



Anson,

What about loading them up with an MBean and retrieving via the
servlet?  I've done this with JBoss/Tomcat, never with standalone tomcat
though.   Or, you populating the objects when the application starts and
put the object it into the JNDI tree?  

John Moore


On Tue, 2003-10-07 at 03:42, zeallousbigpond.net.au wrote:
> Hi guys!
> 
> Is it possible to create a bunch of objects, put them aside, and
> Servlets can just access them any time without recreating those objects
> or having to pass them around??
> 
> say, Vector s = a very large vector of Strings that will appear in many
> servlets, but now I don't want to have to create them in each servlet, I
> want to have them pre-created somewhere, and servlets will go grab them
> when they need that Vector of Strings.
> 
> Thanks!
> 
> Anson
>                                                                       
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to