1 Reply Latest reply on May 11, 2008 3:41 PM by gejzir

    Cluster and context parameters

    gejzir Newbie

      Hi All,

      I have a JSF/facelets web application which works well in single server mode. Now I try to set up clustering, and I'm running into a problem.

      We have a PrettyUrlPhaseListener, which reads the URL mappings from the context parameters placed in the web.xml file.


      URL mappings

      Deploying the war file under the "default" config in jboss 4.2.2 works fine, the phase listener reads the parameters from the web.xml using:

      FacesContext context;
      String patternInitParam = context.getExternalContext().getInitParameter(URL_PATTERNS_INIT_PARAM);

      The same war file deployed under the "all" configuration on the same jboss 4.2.2 application server sees no context parameters. Even the context.getExternalContext().getInitParameterMap() returns null.

      What am I missing here? Is it a clustering config issue or a tomcat config issue?
      Where do I have to set up context-parameters for web applications if not in the war packaged web.xml file?

      Thanks in advance:

        • 1. Re: Cluster and context parameters
          gejzir Newbie

          I've figured it out.

          We've been reading the context params from the getPhaseId() function of the PhaseListener. In the clustered "all" configuration context parameters are not initialized in the context by the time the getPhaseId() function runs. It seems that in the "default" configuration context parameters are initialized earlier.

          Solution: we're reading the context parameters later, in the beforePhase function.