struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: Storing data in session scope
Date Tue, 21 Jun 2005 21:29:49 GMT
Do you truly need this information everywhere in the app?  If not you 
might be able to quite easily get away with just reading it in every 
time you need it.  Create a helper class with a single method that 
returns some Map or something (or a custom bean, whatever is 
appropriate) and use this class wherever you need the data.

Remember that what your talking about, since it sounds like the data is 
primarily stored in a database, is caching.  Caching can get very 
complicated in a hurry in terms of keeping things up to date and such. 
You'll either need to tackle all the details yourself, or you will need 
to find a 3rd-party library to take care of the details for you, which 
of course carries its own problems (and benefits).  Wendy offered a link 
in a previous post if you choose to go that direction.

Frank

Rafael Taboada wrote:
> I really appreciate ur help, thanks to everybody for ur reply.
>  In my web.xml file I have:
>  <welcome-file-list>
> <welcome-file>/index.jsp</welcome-file>
> </welcome-file-list>
>  So when the user write the URL http://localhost:8084/SanCristobal... It 
> calls the index.jsp file.
>  This file has a frameset (I didn't use tiles).
>  So, My doubt is how to store some data in application scope.
>  What data do I need to store???. Data that it has to be updated if the user 
> goes to a module which update that data but in database. So If the user 
> updates the data, it has to be updated automatically in the application 
> scope.
>  This data is not big... Here in Peru we have to know how much a dolar costs 
> in Soles (our coin). So the entire application needs to know the cost.
> Another data is about TAX and it's the same for all users.
>  Ey Dave Newton, I don't practice Kali/Arnis
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message