• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session time is not reseting

 
sureshkumar settu
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a doubt on session object maintenance. I have tried many ways still my session timed out.

I used all the basic thing like request.getSession (true). That is not a prob.

Here is the scenario:
I have one page, that is used for data entry. I want to restrict the user to use that page for 30 min, If they want they can extend another 30 minutes. Also i am using web-logic in that session time-out value is 30 min.

First time if a user use that page for >28 min then one pop-up(alert) will come to will allow user to extend. It is working fine in JavaScript that provide pop-up(alert) but the session was not reset to another 30 min. So i replace with showModalDialog (it gives one pop-up JSP). still session is not reset.

I have tried and tried and tried, still i could not fix it.

I hope i have explained well. sorry for my poor english.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Session timeout gets reset when there is a request containing the session id cookie. The server has no way of knowing what your user is doing other than by a request.

To keep the session alive your JavaScript will have to make a request.

Bill
 
sureshkumar settu
Greenhorn
Posts: 16
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you reply.

Now i replace that alert message by JSP. now session is maintaining.

Another prob:

When i replace with Jsp file. i.e. I will show pop-up screen after users didn't use my page for 28 minutes, when users wants to extend the time they needs to click the ok button with in 2 mintues. If not i need to kill the session. for killing the session i use servlet (SessionExpire).

so i change (window.dialogArguments).location.href="/**/SessionExpire" and i will close the pop-up window. i got unknown-source error while changing the page.

******************************************************************************************
at com.zz.yy.SessionExpire.realDoGet(Unknown Source)
at com.xx.IOServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at com.xx.IOServlet.realService(Unknown Source)
at com.xx.IOServlet.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
*********************************************************************************************

For previously we use alert message, thats was working correctly (but not maintain session) by redirecting to login page. this cause error.

I think this may come because of request or response or session object. I have decalred the session in pop-up page and i redirecting the parent page to SessionExpire servlet, Is there any thing i am missing like not forwarding request, response object???/

Please help me.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!