struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Drop-down list
Date Thu, 01 Mar 2001 23:03:44 GMT
"Dorai, Harish (c)" wrote:

> Suppose I have the drop down list which I wanted to create from a database
> and the database is updated less frequently, is there a way in which I can
> implement somekind of caching mechanism, with which I won't do a database
> query always, instead I can use the cache to populate the drop down list?

What I do in my real applications is to load in the options for each combo box
at startup time, and store each as servlet context attributes.  That way,
everyone uses the same copy without having to go to the database every single

If the values do change occasionally, and you don't want to shut down your app
to recognize them, you could even define an Action that reloads them.


View raw message