Solved

Cache in Java

Posted on 2008-06-12
4
572 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
4 Comments
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 250 total points
Comment Utility
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 250 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

771 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now