Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

redirecting from idle pages

  • 01-08-2006 9:02am
    #1
    Registered Users, Registered Users 2 Posts: 1,305 ✭✭✭


    hi
    i'm trying to get a jsp page to redirect back to a login page if the current page they are on has been left idle for 10 minutes.

    any suggestions?
    Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 1,071 ✭✭✭Art_Wolf


    Why not just include a basic meta refresh?

    <meta http-equiv="refresh" content="600;url=http://www.blah.com/login.jsp"&gt;


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Won't that redirect after 10 minutes even if not idle ?


    The way I'd handle it with ASP, and I'm sure there's a similar JSP equivelent, is to have sessions time out after 10 minutes. Set a session variable somewhere along the line and then check on each page if it's still set (or better yet put the check in an include file that each relevant page can include), redirect if not. If you store any user details in session variables already, this is ideal. On each page (or your include file) you just check if you have a validly logged in user, if not redirect to the login page, this also then means that only logged in users can access your pages and it's easily extended to cover rights based access.

    Of course it does mean that it won't redirect after 10 minutes untill there is some navigation action by a user.


    edit: Actually thinking about it now, you may already be doing what I suggest and you're looking for a way to have it automatically redirect without user interaction ?


Advertisement