Solved

Cache in Java

Posted on 2008-06-12
4
578 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 250 total points
ID: 21775219
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 250 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

Industry Leaders: 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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

728 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