[seam-issues] [JBoss JIRA] (JBSEAM-5093) Seam produces malformed partial response on ViewExpiredException with Ajax

Marek Schmidt (JIRA) jira-events at lists.jboss.org
Thu May 2 11:50:53 EDT 2013


Marek Schmidt created JBSEAM-5093:
-------------------------------------

             Summary: Seam produces malformed partial response on ViewExpiredException with Ajax
                 Key: JBSEAM-5093
                 URL: https://issues.jboss.org/browse/JBSEAM-5093
             Project: Seam 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.3.0.Final
         Environment: Seam 2.3.1-SNAPSHOT 2013-05-02 082f3b3459893b1c4200b7bd8ce99556f87f0dd0 
            Reporter: Marek Schmidt
            Assignee: Marek Novotny


When ViewExpiredException occurs in an Ajax request, the response is malformed, containing duplicate partial-response element. This results in the response not being parsed (and in this case, redirect not being followed).

{noformat}
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><redirect url="/seam-booking/home.seam?cid=22"></redirect></partial-response><?xml version="1.0" encoding="UTF-8"?>
<partial-response><redirect url="/seam-booking/home.seam?cid=22"/></partial-response>
{noformat}

This seems to happen, because there are two rules for the redirection in pages.xml:

- main.xhtml has login required, handled in Pages.redirectToLoginView()
 <page view-id="/main.xhtml" login-required="true">

- exception handler for ViewExpiredException, handled in ExceptionFilter
<exception class="javax.faces.application.ViewExpiredException">
   <redirect view-id="/home.xhtml">
   ...
</exception>

None of the Seam's components involved (ExceptionFilter, Pages, Exceptions, RedirectHandler, MockExternalContext, ... ?) checks whether the response has already been written and the redirect partial response gets written twice.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list