Bug 1017242 - FacesMessages doesn't work properly in root context application
FacesMessages doesn't work properly in root context application
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JSF (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: DR1
: EAP 6.3.0
Assigned To: Farah Juma
Tomas Remes
Russell Dickenson
: 1027367 (view as bug list)
Depends On: 1044751 1051674
  Show dependency treegraph
Reported: 2013-10-09 09:26 EDT by Tomas Remes
Modified: 2014-07-28 11:39 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Last Closed: 2014-06-28 11:31:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer (12.27 KB, application/zip)
2013-10-10 08:07 EDT, Tomas Remes
no flags Details

  None (edit)
Description Tomas Remes 2013-10-09 09:26:12 EDT
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.
Comment 1 Tomas Remes 2013-10-10 08:07:46 EDT
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">
                <alias name="localhost"/>
                <alias name="example.com"/>
3. Unzip attached zip.
4. Run mvn clean verify -Darquillian=jbossas-managed-7
Comment 2 Farah Juma 2013-10-17 11:39:55 EDT
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.
Comment 3 Stan Silvert 2013-10-24 15:00:01 EDT
Reassigning to Farah Juma.

The JBoss version of Mojarra 2.1.16 has been released.  If we need to upgrade, please let her know.
Comment 4 Tomas Remes 2013-10-29 09:06:18 EDT
Current EAP 6.2.0.ER6 release contains following version:

Implementation-Version: 2.1.19-redhat-1
Bundle-Name: Mojarra JSF Implementation 2.1.19 20130304-0420-SNAPSHOT

where this issue still occurs, so I guess we need to update.
Comment 6 Scott Mumford 2013-11-19 22:23:23 EST
Switched Doc Type to Known Issue and added Doc Text content. Set for inclusion in EAP 6.2 Release Notes.
Comment 7 Farah Juma 2014-04-04 11:30:58 EDT
Setting to ON_QA since the component upgrade (bug 1051674) should fix this.
Comment 8 Tomas Remes 2014-04-07 08:04:29 EDT
Verified in 6.3.0.ER1 release.
Comment 9 Ron Šmeral 2014-07-28 11:39:46 EDT
*** Bug 1027367 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.