In previous versions of JBoss EAP 6 it was found that JSF Flash scope was not restored properly during redirects if the application was bound to the root context. This meant that FacesMessages did not work properly in root context applications.
This release of the product sees the Mojarra component upgraded to the latest upstream version, which fixes the issue and FacesMessages now work properly even in root context applications.
Basically the problem is when you do redirect from /firstPage to /second/secondPage in root context application and want to use FacesMessages.
However the attribute keepMessages is set to true, in com.sun.faces.context.flash.ELFlash in method isKeepMessages() is resulted as false in RESTORE_VIEW phase (this returns null in this case phaseMap.get(CONSTANTS.KeepAllMessagesAttributeName.toString()) .
For more info you can see https://community.jboss.org/message/840304. I'll attach the reproducer asap.
Created attachment 810488 [details]
Attached reproducer. To run please follow these steps:
1. set your JBOSS_HOME
2. update http connector settings in standalone.xml to
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="false" default-web-module="bz1017242">
3. Unzip attached zip.
4. Run mvn clean verify -Darquillian=jbossas-managed-7
This issue no longer occurs when using the latest version of JSF 2.1.x (i.e., JSF 2.1.26).
Note that the issue does occur with JSF 2.2.0 but is resolved when using JSF 2.2.1 or later.
Reassigning to Farah Juma.
The JBoss version of Mojarra 2.1.16 has been released. If we need to upgrade, please let her know.
Current EAP 6.2.0.ER6 release contains following version:
Bundle-Name: Mojarra JSF Implementation 2.1.19 20130304-0420-SNAPSHOT
where this issue still occurs, so I guess we need to update.
Switched Doc Type to Known Issue and added Doc Text content. Set for inclusion in EAP 6.2 Release Notes.
Setting to ON_QA since the component upgrade (bug 1051674) should fix this.
Verified in 6.3.0.ER1 release.
*** Bug 1027367 has been marked as a duplicate of this bug. ***