The moose likes JSP and the fly likes display message when browser is inactive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "display message when browser is inactive" Watch "display message when browser is inactive" New topic

display message when browser is inactive


Joined: Dec 14, 2001
Posts: 1
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
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

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

Take a Minute, Donate an Hour, Change a Life
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Hello Sirisha,
You can use HttpSession for user Inactivity.

Sarath Mohan
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

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

- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
I agree. Here's the link: http://aspose.com/file-tools
subject: display message when browser is inactive
Similar Threads
Session Expired
Supressing the message
local OS authentication with was 5.1
multiple tomcat 5 setting???