473,320 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Invalidate the servlet session if session timeout even when UI automatically updates

Hi experts,

Technologies: Spring, AJAX, Google web tool kit

Problem: Ideally when the user stops using a web page then after 30 minutes, if the user is trying to access any ting then the session gets expired.
But In my case one pages continually refreshes for every 30 seconds, hence not giving scope to session timeout even when the user stops using it.

Questions:
Is there any way to stop resetting of time in some specific cases, for example when we automatically refresh the screen then it should not consider that time.
OR
Is there any other solution checking the events(Mouse and Keyboard) and manually and then do session.invalidate(). In this case. I am not able to know a best place to update the Attribute for saving the current time when the user clicks.

Please let me know your Opinions
Nov 19 '08 #1
5 5809
acoder
16,027 Expert Mod 8TB
First of all, why is the page refreshing every 30 seconds? Is it a whole page refresh or Ajax calls?
Nov 19 '08 #2
The page i am refering to has some connections and status information which will be checked for every 30 sec and update the GUI with the icons and message information.

The complete page is refreshed at this time.
Nov 20 '08 #3
acoder
16,027 Expert Mod 8TB
How about converting to Ajax requests, so the whole page is not refreshed? The URL that the request is made to doesn't set the session time so if there's no user interaction and the time has passed, the session is invalidated.
Nov 20 '08 #4
-- Presently we use Ajax request
-- we are not setting the session timeout, it is taking the tomcat session timeout bu default.
-- How to find out that there is no intaraction from the user and the time expired so that we can invalidate the session?
Nov 20 '08 #5
acoder
16,027 Expert Mod 8TB
If the Ajax requested page doesn't have any session code, would it work, i.e. you don't start a session in that page, so if requested, it wouldn't register as part of the session? This depends on how your server-side code works.
Nov 20 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Chris Lasher | last post by:
Hello, I really like the finditer() method of the re module. I'm having difficulty at the moment, however, because finditer() still creates a callable-iterator oject, even when no match is found....
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
1
by: vermon | last post by:
Is there any way to make a web app that updates automatically when the server updates some flags? An example would be a web mail interface that automatically updates the new email count as emails...
3
by: Alan Silver | last post by:
Hello, I have some pages that are protected by forms authentication, and am adding code to the global.asax so that if someone tries to load (say) /order83.aspx, if they are logged in, it will...
1
by: Jon | last post by:
Hi, How to make a combobox that always show as dropdown even when user click on other places of the windows form? By setting combobox.dropdown = TRUE. This work if the focus is on the...
1
by: ABC | last post by:
Will Session automatic clear memory when I unload web page?
2
by: Alan Silver | last post by:
Hello, I have a pair of radiobuttons on a form, used to select the type of search someone is to do... <asp:RadioButton ID="rdbLastNDays" Text="Show tips for the last" GroupName="rbgSearch"...
0
by: Untitled | last post by:
Using Ajax .NET (or javascript) to auto-refresh some pages causes the Session timeout to reset. In my application I have certain panels that i would like to update every 10 seconds or so, but i...
5
by: jheines | last post by:
I am trying to explain how cookies and sessions work in a class I teach, but I have hit a wall when it comes to the interaction between cookies and the state of the privacy settings in Internet...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.