All components in RenderPhaseListener.

I'm using MyFaces with JSPs and I'm trying to find a way to code a "page requested" event where a listener gets notified whenever a page is requested. It would be sort of like the service method in a servlet. I tried some variations of a Render Phase Listener and it seems to work, but sometimes there are no components in the UIViewRoot of the page when the event fires. It looks like the first time I go to the page the tree is empty and then after that it's OK.

Is there some way to have a event that gets fired:

1) Every time a page gets requested via a post or a get.

2) Always has the component tree for the page fully built when the event gets fired.

3) Works in JSP pages.

[714 byte] By [dandubinskya] at [2007-11-26 17:57:40]
# 1
> but sometimes there are no components in the UIViewRootAfter a fresh restart of a server, the components are initialized and populated for the first-time in the render response. So those are only available in the afterPhase of the render response and not in the beforePhase.
BalusCa at 2007-7-9 5:10:52 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...