Hi,
I'm using the following:
Glassfish 3.1
Mojarra 2.1.0 (included with Glassfish)
Primefaces 3.0M2
I'm using container security with form based login. I have a secured page that contains a p:commandButton that updates part of the page. All works fine whilst the user is logged in.
Once the session times out the application appears to lock up. What is happening is that the partial AJAX request from the button is expecting an XML response, but Glassfish sends it the HTML for the login page instead (as it should, the session has timed out). Would it be possible to get the partial request code to handle this situation, maybe refresh the whole page to allow the container redirect to work?
I've created a small war file/eclipse project to demonstrate the problem. I can provide that on request.
Regards,
Nick
Partial AJAX calls don't handle container session timeouts
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Issue already exists: http://code.google.com/p/primefaces/iss ... il?id=1843
You could write an own exceptionhandler and redirect on session expiration (viewtopic.php?f=3&t=2631)
You could write an own exceptionhandler and redirect on session expiration (viewtopic.php?f=3&t=2631)
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
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
This is an important one, I'll take this into M3.
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Great, thanks cagatay!
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
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
So how should we solve this case, any feedback is welcome. Probably we should implement it in onerror callback of ajax request.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
This is what we get in case of error;
So you catch the exceptin and send a redirect to login page right?
Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><error><error-name>class javax.faces.application.ViewExpiredException</error-name><error-message><![CDATA[viewId:/ui/pprUpdate.jsf - View /ui/pprUpdate.jsf could not be restored.]]></error-message></error></partial-response>
Hi,
Maybe this can help you:
http://ovaraksin.blogspot.com/2010/10/j ... meout.html
http://ovaraksin.blogspot.com/2010/10/g ... ecked.html
I use that in all my web apps with success.
Maybe this can help you:
http://ovaraksin.blogspot.com/2010/10/j ... meout.html
http://ovaraksin.blogspot.com/2010/10/g ... ecked.html
I use that in all my web apps with success.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Will check, thx!
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Hmm yep i think onerror with the error message and type should be ok and should also be flexible enough. What do you think?
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
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Also then onerror should be possible on fileupload etc. too!
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
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests