Get it from the servletContext and change it...dynamically.
--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
MSN: [EMAIL PROTECTED]
-Original Message-
From: keshav [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19,
We store much more information that in our
application context and dont have any performance issues.
We store all our master data (static) on startup. The
performance is enhanced.
Again it depends on how much
data you have and how much it is supposed to grow over time.
That you should consider.
Hi Danilo,
One of the parameters of the perform method is servlet, which represents the
ActionServet (which extends HttpServlet, and so on...).
So, you can call servlet.getServletContext() to obtain the ServletContext.
Wellington
-Original Message-
From: Danilo Luiz Rheinheimer
On Mon, 22 Apr 2002, Danilo Luiz Rheinheimer wrote:
But how I can do it on a Struts application ? I want to do it on the
perform method of a action. So how I can get a ServletContext object ?
... = request.getSession ().getServletContext ().get...
Regards,
Elmar
--
To unsubscribe,
y comments?
-Original Message-
From: Jim Richards [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 07, 2001 9:01 PM
To: [EMAIL PROTECTED]
Subject: Re: servlet context attribute?
"Young, Wayne" wrote:
Ok, that gets me closer. I created the servlet put the following code
i
You could implement your class as a singleton.
-Original Message-
From: Young, Wayne [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 11:10 AM
To: Struts-User@Jakarta. Apache. Org (E-mail)
Subject: servlet context attribute?
I've seen references on this list about storing an
"Young, Wayne" wrote:
Ok, that gets me closer. I created the servlet put the following code in
the init() method.
// Store the lookup service in the servlet context
LookupService lookupService = new LookupService();
You can have a stand alone servlet that will create the instance of your
cache object in its init() method and put it in ServletContext using
setAttribute. Or other approach would be to use a Startup class (this is
available in Weblogic) which will have the Cache object as an instance
property.
get access to this attribute in a class that has nothing to do
with servlets. Is there a method call I can make?
Wayne
[EMAIL PROTECTED]
-Original Message-
From: Dorai, Harish (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 06, 2001 12:20 PM
To: '[EMAIL PROTECTED]'
Subject: RE: servl
9 matches
Mail list logo