2 Replies Latest reply on Oct 9, 2013 5:08 PM by Seth Wingert

    JBoss 7.2: Flash scoped messages not surviving post-redirect-get when root virtual host specified

    Seth Wingert Newbie

      I'm using JBoss EAP 7.2.0 Final (EAP 6.1) with JSF 2.1.19 and configured my host as a virtual server at the root context.  (Using a non-root context like /myApp, everything works fine).  I'm trying to show FacesContext info messages after a redirect using flash scope.  For some reason I am not consistently getting the Faces message to show up on the second page.  Sometimes it does, sometimes not.  Sometimes it shows up back on the first page.  Any ideas what's wrong?



      Here is my JSF2 bean:




          public class TestBean {



              public String submit() {


               FacesContext.getCurrentInstance().addMessage(null,new FacesMessage("Faces Info Message"));

               return "/second/secondPage?faces-redirect=true";





      Relevant firstPage.xhtml:



              <h:commandButton value="ClickMe" action="#{testBean.submit()}"/>




      Relevant secondPage.xhtml:




              <h:messages id="globalMessages" globalOnly="true"/>

              <h:link outcome="/firstPage" value="Back"/>




      JBoss standalone.xml:


          <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="myApp" enable-welcome-root="false" default-web-module="myApp">

                  <alias name="localhost"/>





      jboss-web.xml packaged with myApp:









      Please help!  I'm totally stumped on this one.