I am working on a project which uses Oracle9i App Server and Database also.
I explicitly set the session time out 30 seconds by calling the session.setMaxInactiveInterval(nseconds).
And i used a technique.....
Our session_id lives per one browsing session...
I kept a hidden frame on the main page, which automatically detects the time before 5 seconds of session time out..
And that hidden frame is reloaded automatically before 5 seconds of session time out...So the session againgst that browsing session never be died, but it happens
My code is following.................
<%@ page contentType="text/html;charset=WINDOWS-1252"%>
<html>
<head>
<title>False Request</title>
<script language = javascript>
var session_time_out = null;
var page_start_time = null;
function startPage()
{
try
{
session_time_out = document.all.session_time_out.value;
page_start_time = new Date();
var new_fun = function()
{
try
{
//alert(session_time_out + "\t" + page_start_time.getTime());
var right_now = new Date();
//alert(right_now.getTime() - (session_time_out+page_start_time.getTime()));
//alert(session_time_out);
//alert(right_now.getTime()/1000 + "\t\t" +page_start_time.getTime()/1000);
//alert(right_now.getTime() - page_start_time.getTime() + "\t\t" + (session_time_out - 5)*1000);
if(right_now.getTime() - page_start_time.getTime() >= (session_time_out - 5)*1000)
{
//alert("");
window.location.reload(); //Reloads the page just before 5 seconds of session time out
}
}
catch (err)
{
alert(err.description);
}
}
window.setInterval(new_fun,1000);
}
catch (err)
{
alert(err.description);
}
}
</script>
</head>
<body onload = startPage()>
<input type = hidden name = session_time_out value = "<%=session.getMaxInactiveInterval()%>">
</body>
</html>
Plz arrange this code for ur convenience...
Is my technique right or wrong....
I think there is any problem with App server..
Pllllllllllllllllllllzzzzzzzzzzzzzzzzzzzzzzzzzzzzz help me out...................