Bug 1017242 - FacesMessages doesn't work properly in root context application
Summary: FacesMessages doesn't work properly in root context application
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JSF
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: DR1
: EAP 6.3.0
Assignee: Farah Juma
QA Contact: Tomas Remes
Russell Dickenson
URL:
Whiteboard:
: 1027367 (view as bug list)
Depends On: 1044751 1051674
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 13:26 UTC by Tomas Remes
Modified: 2018-12-03 20:13 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-06-28 15:31:54 UTC
Type: Bug
Embargoed:


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

Description Tomas Remes 2013-10-09 13:26:12 UTC
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 12:07:46 UTC
Created attachment 810488 [details]
reproducer

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"/>
            </virtual-server>
        </subsystem> 
3. Unzip attached zip.
4. Run mvn clean verify -Darquillian=jbossas-managed-7

Comment 2 Farah Juma 2013-10-17 15:39:55 UTC
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 19:00:01 UTC
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 13:06:18 UTC
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-20 03:23:23 UTC
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 15:30:58 UTC
Setting to ON_QA since the component upgrade (bug 1051674) should fix this.

Comment 8 Tomas Remes 2014-04-07 12:04:29 UTC
Verified in 6.3.0.ER1 release.

Comment 9 Ron Šmeral 2014-07-28 15:39:46 UTC
*** 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.