Perhaps, this comes from the fact that you specify

    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>

in your web.xml file. The javax.faces.CONFIG_FILES variable is set to /WEB-INF/faces-config.xml by default and specifying it again in web.xml makes the faces-config.xml file to be processed twice (for some raeson I don't know). This results in your registered phaseListener to actually be registered twice as well.

The solution is to delete this part in your web.xml or to rename faces_config.xml to something else.

Jan

On Thu, 08 Sep 2005 03:25:38 +0200, Saul Qunming Yuan <[EMAIL PROTECTED]> wrote:

Hi,

I implemented a phaseListener to catch phase event. However, every time a jsp page rendered from a backing bean, the afterPhase(PhaseEvent event) method gets called twice, and I get the same viewId by calling facesContext.getViewRoot().getViewId(). Any ideas what the problem is?

thanks,
Saul



Reply via email to