John, why not retrieve these from the DB at application start up time
and place them in the ServletContext where they are accessible for
the life time of the application and easily rendered by JSTL or Struts
tags.

robert

> -----Original Message-----
> From: Menke, John [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 03, 2004 9:36 AM
> To: Struts (E-mail)
> Subject: static variables in actions
>
>
> if I have a collection of state names and I don't want to have to retrieve
> it over and over again can i
> do something like this in my action?
>
>
> static Collection _collection;
>
> if (collection == null ){
>    _collection = getCollectionFromDB();
> }
>
> form.setCollection = _collection
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> 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