@Sabarish, @Seetharaman
I tried, code as suggested by you and followings are modified jsps.
SessionValidate.jsp
On body onload i am calling 'callFunction' java script function and this functions is calling function 'abc' in the interval of 22 seconds.This abc function is directing to 'SessionValidate.jsp' using ajax. In 'SessionValidate.jsp' i am fetching value from database(whether sessionExpiration is enabled or disabled) and checking the diference of session last accessed time and current time. On basis of above two condition(database value,difference of session.lastAccessedTime and currentTime) I am passing this responseText to 'index.jsp' and if responseText is true then i am forwarding control to 'DestroySession.jsp'.
But when i executed the code,it is not happening like as i was expecting,logs are
I didnt interact with browser session and as we can see from logs even without interactio of user with session '{sesion last accessed time}' is continuously changing.
So,I was relying on session.getLastAccessedTime, which is continuously changing.......
Am i on right direction? or i have to change the code?