I don't see the Point to handle Session Expired on Client Side for any possible Ajax components after Session is gone on server side...
When Session is gone, all states are gone. Game Over you need new Session given from Server side!
How it is implemented on Server Side is just question of preferences.
But I just would like to define what shoud hapen in one places. Using web.xml sound logic to me because you can use it allready to define what shoud happen on given HTTP Error Code.
And I'm not shure if it is possible to force browser to navigate to other URL from Ajax Request directly....probably some javascript hack will be needed..
Even primefaces doesn't support navigation from Ajax....
Partial AJAX calls don't handle container session timeouts
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
@rodakr There are also other exceptions which can be handled on client side, it's not juse ViewExpired
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
Can you provider one sinful example of other exception you would like to handel on client side...
OSX 10.6.x , Fedora 14, XBuntu 10.x , majora 2.x, primefaces 3.0-snapshot, Tomcat 7.x , weblogic server 11.x, jboss 7.x , glassfish 3.x
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
maybe for all unexpected exceptions...
i like the idea of a user friendly redirect or reload on error with dialog or else.
i like the idea of a user friendly redirect or reload on error with dialog or else.
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
this means.... you would like to handel it for each single component which could get the exception..., on all pages ... when unexpected Exception happens
OSX 10.6.x , Fedora 14, XBuntu 10.x , majora 2.x, primefaces 3.0-snapshot, Tomcat 7.x , weblogic server 11.x, jboss 7.x , glassfish 3.x
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
my proposal (on page 2) could register an global error handler on your template... you could create an global error dialog which could be useful... IMO it's better to open an dialog with an error message and an reload button or else then redirect within an exceptionhandler...
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Posts: 34
- Joined: 09 Feb 2011, 20:44
I have been searching all over the internet and there are still no good solutions for primefaces to handle session timeout. There are great new components being added but this important issue still does not appear to be solved. Icefaces handles session timouts automatically which is nice and most others do also. I also would like a simple tag that can be placed in a global facelets template to redirect or any other simple solution. It is amazing that this important issue has not been addressed. I can't even find a working example for a global redirect solution. I have to use a idlemonitor to invalidate the session before it expires and popup a dialog that states the page is expired. If the server is rebooted, the session will expired and when a user clicks on any ajax components it will be frozen. Primefaces is the most intelligent web development framework I have ever seen for Java but it lacks a session timeout mechanism.
-
- Posts: 6144
- Joined: 10 Sep 2011, 21:10
I would like to see the same, so I created a NEW FEATURE request in PrimeFaces Issue Tracker. Please go to this issue in issue tracker, click Star and vote for it, and receive email updates about this issue.
Issue 3397
Issue 3397
Howard
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome
Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
There already was an feature request...
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko