may naren

Greenhorn
+ Follow
since Nov 11, 2013
may likes ...
Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by may naren

TreeSet is implemented as a TreeMap internally which takes in the element which is being added to a TreeSet as the key of the map and value would be a plain java object using new Object(). As per the specs, TreeMap doesn't allow key to be stored as Nulls hence, when you try to add a null element into a TreeSet a NPE is thrown.
9 years ago
Ideally, you should use below code in your jsp to prevent the browser from caching the page. There are 3 variants - in meta tags or in the jsp scriplets or in the servlet sending back the response

in meta tags like :
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">

OR in scriplets like :

<%response.addHeader("Cache-Control","no-cache");%>

9 years ago