Daniel Zwink wrote:


I'm using Tomcat 5.5.9 and MyFaces 1.0.9. When I deploy my war-file the two debug-lines are printed twice on sysout with different hashcodes which indicates to me that the phase listener is instanced twice, too.

If I request a JSF-Page the beforePhase- and afterPhase-method are also called twice for each phase.

Is this normal behaviour? I hope not :-). Any hints?


did you check your rootId?

String rootId = event.getFacesContext().getViewRoot().getViewId();

the reason for doing that simply is, that the phase listeners
get chained, and basically at every request you run into the chain
of phase listeners sending different root ids, the phase listeners
are supposed to trigger on the phase (via callback) and on the rootid
which is sent into the listener cycle.

Reply via email to