Re: Does JSF has a method similar to Servlet API (service...)
Thursday, March 12, 2009 02:06 PM
Knowing exactly what you are trying to accomplish would help. There is no specific method to handle something on every request in JSF formally. You can make a Filter that filter's JSF requests, but your code would not be in the JSF context, but that would only matter depending on what you are trying to do. You can also write a PhaseListener to run code on each request.
There is an easy solution for doing this with a Gracelets, a combination of Groovy+JSF/Facelets (http://gracelets.sourceforge.net) and in particular this part (http://gracelets.sourceforge.net/manual/current_version/chapters/tutorial/writing_lib_jsf.html#phaselistener)
Hope that gives you some options.