0

My goal is to create a function, using primefaces and JSP, to capture how long have the user been with no activity in my website. For example, if the user is not using my page for more than 5 minutes, I need send a dialog box telling him that he's disconnected from the website.

Could anyone help me with this issue?

Pablo
  • 25
  • 3

2 Answers2

1

You don't need PrimeFaces to do this. You need a Filter for your session activity and check if the session timeout has been activate. Here is a good sample on this http://viralpatel.net/blogs/2009/02/http-session-handling-tutorial-using-servlet-filters-session-error-filter-servlet-filter.html

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
0

Is this what you're looking for?

It's the 1st Google result for primefaces detect inactivity (for me at least).

There's also been a js-only question about it on here Detecting idle time in JavaScript elegantly the answers to which might suit you.

Community
  • 1
  • 1
trutheality
  • 23,114
  • 6
  • 54
  • 68