[ https://issues.jboss.org/browse/JBSEAM-5093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772428#comment-12772428 ]
Marek Novotny commented on JBSEAM-5093: --------------------------------------- I don't know how to check already written partial-response in response output stream, so I clear the buffer with not committed content and let MockExternalContext.redirect(String url) to add the partial-response data. The tests - ErrorHandlingTest and ExceptionRedirectTest passes and booking demo behaves correctly again. I will commit the change and will try to launch functional tests to confirm it doesn't affect something else. > 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 > Fix For: 2.3.1.CR1 > > > 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 _______________________________________________ seam-issues mailing list seam-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/seam-issues