Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cache in Java

Posted on 2008-06-12
4
Medium Priority
?
582 Views
Last Modified: 2013-11-24
Hi ,
I am working in a struts application.  I have a jsp with select button and  form fields like ename , empno, deptno etc.  my question is  I would like to store these values in a cache  when i click on select  and when i modify the values on the jsp the chache should be modified. can u explain me with a sample java program.

Thanks in Adv
0
Comment
Question by:samk4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 1000 total points
ID: 21775219
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 1000 total points
ID: 21792393
I think in one class you can create static HashMap and use it as cache.
You have to more careful that value should get removed from cache otherwise it will become more big and you may get outofmemory exception on day.
http://www.javaworld.com/javaworld/jw-07-2001/jw-0720-cache.html?page=2
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question