Solved

Cache in Java

Posted on 2008-06-12
4
577 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

Technology Partners: 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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

732 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