This content has been marked as final.
Show 6 replies
-
1. Re: ViewExpiredException
fabmars May 23, 2008 11:18 AM (in response to meurisse)I think it's coming soon:
http://jira.jboss.com/jira/browse/RF-3102 -
2. Re: ViewExpiredException
lmk May 23, 2008 11:46 AM (in response to meurisse)to turn around it
you can implement JSF PhaseListener
on the afterPhase functionlogger.info("AFTER " + e.getPhaseId()); PhaseId phaseid = e.getPhaseId(); FacesContext context = e.getFacesContext(); HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse(); HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest(); if (phaseid == PhaseId.RESTORE_VIEW || phaseid == PhaseId.INVOKE_APPLICATION) { if (context.getViewRoot() == null) { try { response.sendRedirect("login.jsf"); } catch (IOException e1) { } }
this works..waiting the end of developpement.. -
3. Re: ViewExpiredException
meurisse May 27, 2008 11:11 AM (in response to meurisse)It works well for 'normal' jsf requests, but not for ajax requests...
This is what happens when clicking on an ajax-enabled action after session expiration:
restore view, view root == /login.xhtml
render response, view root = /login.xhtml
-> login page is shown in browser (FF3.0, IE6)
after login:
restore view, view root == null -> response.sendRedirect(request.getContextPath());
A blank page is shown in browser:<?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="Ajax-Response" content="redirect" /><meta name="Location" content="/xenturion-mmi" /></head></html>
-
4. Re: ViewExpiredException
lmk May 27, 2008 11:35 AM (in response to meurisse)are you using facelets or not?
-
5. Re: ViewExpiredException
meurisse May 28, 2008 4:48 AM (in response to meurisse)Yes,
facelets 1.1.14
myfaces 1.2.2
tomahawk 1.1.6 -
6. Re: ViewExpiredException
lmk May 28, 2008 10:31 AM (in response to meurisse)"meurisse" wrote:
Yes,
facelets 1.1.14
myfaces 1.2.2
tomahawk 1.1.6
I think when ajax request is sent after sessionExpired, there exist special message on the faces context added by a4j viewHandler.
if you find what's the message you can workaround this problem..
it's just a temporary solution wainting the end of the correction.