Re: Universally Accessable Object

2003-02-21 Thread David Graham
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

Re: Universally Accessable Object

2003-02-21 Thread Geeta Ramani
> > 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

Re: Universally Accessable Object

2003-02-20 Thread David Graham
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 > > > >

Re: Universally Accessable Object

2003-02-20 Thread Geeta Ramani
> 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

RE: Universally Accessable Object

2003-02-20 Thread John Espey
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

Re: Universally Accessable Object

2003-02-20 Thread Geeta Ramani
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 > > > &

RE: Universally Accessable Object

2003-02-20 Thread John Espey
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

Re: Universally Accessable Object

2003-02-20 Thread Ashish Kulkarni
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

Re: Universally Accessable Object

2003-02-20 Thread Geeta Ramani
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

RE: Universally Accessable Object

2003-02-20 Thread David Graham
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

RE: Universally Accessable Object

2003-02-20 Thread Art Vandalay
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

RE: Universally Accessable Object

2003-02-20 Thread DUBCHAK, JOHN (SBCSI)
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,

Re: Universally Accessable Object

2003-02-20 Thread Art Vandalay
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) >

Re: Universally Accessable Object

2003-02-20 Thread David Graham
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

Re: Universally Accessable Object

2003-02-20 Thread Art Vandalay
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

Re: Universally Accessable Object

2003-02-20 Thread Robert McIntosh
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

Re: Universally Accessable Object

2003-02-20 Thread Robert McIntosh
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

RE: Universally Accessable Object

2003-02-20 Thread John Espey
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