[richfaces-issues] [JBoss JIRA] Created: (RF-5456) Non-Ajax requests badly handled if ViewExpiredExceptions are managed on client

Pierre Wargnier (JIRA) jira-events at lists.jboss.org
Mon Dec 22 11:25:08 EST 2008


Non-Ajax requests badly handled if ViewExpiredExceptions are managed on client
------------------------------------------------------------------------------

                 Key: RF-5456
                 URL: https://jira.jboss.org/jira/browse/RF-5456
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.2.2
         Environment: Tomcat 6 + Facelets + JSF 1.2_09 RI
            Reporter: Pierre Wargnier


If you activate org.ajax4jsf.handleViewExpiredOnClient in web.xml, the ViewExpiredExceptions are catched by the Ajax filter and a Ajax response will create a javascript "confim" window to ask the user to reload the page.

If the request that cause the ViewExpiredExceptions is not an AJAX one: only a blank page with the AJAX XML behind.

Proposed solution: Handle ViewExpired on client _only_ if request is AJAX. Throw the exception the normal way otherwise.

In org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(FilterChain, HttpServletRequest, HttpServletResponse)
instead of

log.error("Exception in the filter chain", e);
if(handleViewExpiredOnClient && isViewExpired(e)){

do this:

if(handleViewExpiredOnClient && isViewExpired(e) && request.getParameterMap().containsKey("AJAXREQUEST")){
   log.info("View expired handling sent to client"); //View expired exceptions are quite commons, don't clog the logs tracing them


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list