t think that given that the servlet spec
gives
> >you
> > > listeners and filters, your application server gives you startup
> >classes,
> > > and Struts gives you the request processor and plugins, you have
options
> > > that are more flexible than breaking th
> > listeners and filters, your application server gives you startup
> >classes,
> > > and Struts gives you the request processor and plugins, you have options
> > > that are more flexible than breaking the encapsulation of the
> >ActionServlet
> > > by ext
he
ActionServlet
> by extending it.
>
> > -Original Message-
> > From: Geeta Ramani [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 2:47 PM
> > To: Struts Users Mailing List
> > Subject: Re: Universally Accessable Object
> >
> >
> that are more flexible than breaking the encapsulation of the ActionServlet
> by extending it.
>
> > -Original Message-
> > From: Geeta Ramani [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 2:47 PM
> > To: Struts Users Mailing List
> &g
the
> > data only gets loaded once? Or a startup class (if you don't mind being
> > tied to your container) I would think you'd want anything but
> to extend the
> > ActionServlet at this point.
> > John
> >
> > > -Original Messa
gt; ActionServlet at this point.
> John
>
> > -Original Message-
> > From: Geeta Ramani [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 20, 2003 2:22 PM
> > To: Struts Users Mailing List
> > Subject: Re: Universally Accessable Object
> >
> &
Users Mailing List
> Subject: Re: Universally Accessable Object
>
>
> Larry:
>
> An easy way to do this would be to:
>
> 1. Write a controller class which extends the Struts ActionServlet.
> 2. Declare a *static* object of type (say) Hashtable in this controller.
> 3. In t
Hi,
i have done some thing like this,
I have a servlet which is loaded while starting the
application, in the init method of this servlet i load
a table and put it in servlet context,
ServletContext oCtx = config.getServletContext();
oCtx.setAttribute("MyTable", myTable);
and then in your Actio
Larry:
An easy way to do this would be to:
1. Write a controller class which extends the Struts ActionServlet.
2. Declare a *static* object of type (say) Hashtable in this controller.
3. In the init() method of the controller, write code to initialise this hashtable.
4. Finally make the appropria
ROFL!
David
From: Art Vandalay <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: RE: Universally Accessable Object
Date: Thu, 20 Feb 2003 10:52:49 -0800 (PST)
I did save the w
u able
> to save that whale?
>
> -Original Message-
> From: Art Vandalay [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 12:50 PM
> To: Struts Users Mailing List
> Subject: Re: Universally Accessable Object
>
>
> No, but I always wanted to pretend to b
Can you explain what happened on the beach that day. Why weren't you able
to save that whale?
-Original Message-
From: Art Vandalay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 12:50 PM
To: Struts Users Mailing List
Subject: Re: Universally Accessable Object
No,
ay <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: Struts Users Mailing List
> <[EMAIL PROTECTED]>
> >Subject: Re: Universally Accessable Object
> >Date: Thu, 20 Feb 2003 10:40:41 -0800 (PST)
>
Art,
You don't happen to be an architect do you?
David
From: Art Vandalay <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Universally Accessable Object
Date: Thu, 20 F
I'm not sure what app server you are using, but some
(including WebLogic) allow for "startup" classes.
These are classes that will be instantiated when the
server is started. You could identify your class as a
startup class and then store it in the proper scope.
Then call RequestUtils.lookup(...) t
I believe this is only for Servlet 2.3, correct?
- Robert
John Espey wrote:
1) create an object that implements ServletContextListener (read the
javadocs on it to see how to configure it in web.xml)
2) put the object on the servlet context. Here's code from a listener that
I have:
public vo
Larry Hytail wrote:
I have a table of information contained in a backend database. The table is not very big and never will be. I would like to create an object that holds the values from this table. I would like this object to instantiate when the struts webapp is started. Then I would lik
1) create an object that implements ServletContextListener (read the
javadocs on it to see how to configure it in web.xml)
2) put the object on the servlet context. Here's code from a listener that
I have:
public void contextInitialized(ServletContextEvent sce)
{
sce.getServletContext().se
18 matches
Mail list logo