[Logo]
Forums Register Login
display message when browser is inactive
hi,
i want to display some message in browser .if the user does not perform any action after login with in one hour.i need help
the code may be in jsp or javascript
ok
thanks
sirisha

"sirishareddy"
your user name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the
guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya
Hello Sirisha,
You can use HttpSession for user Inactivity.
Bin
 

Originally posted by binu kavumkal:

You can use HttpSession for user Inactivity.


-- but this won't display a message in the inactive browser -- HTTP is stateless -- your server can't randomly contact browsers who made requests to it previously. I don't think what you want is possible.
The best you can do is to invalidate the session after a certain period (check session.setMaxInactiveInterval() ) and if the person tries to contact the app after their session has been inactivated, redirect them to a login screen.
------------------
- Jessica Bradley
HP Bluestone
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 1040 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 17, 2018 09:36:09.