Author
Please help to create Phase Listener
Kate Something
Greenhorn
Joined: Jul 19, 2009
Posts: 1
Hi
please hepl me I need to create a web application with Phase Listener that will check valid requests that are received and forward to other web site for processing and forward results to original requester.
What should I use Request Dispatcher? Some initial code will be appriciated
thanks
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26195
Kate,
Welcome to CodeRanch!
What is a phase listener?
[Blog ] [JavaRanch FAQ ] [How To Ask Questions The Smart Way ] [Book Promos ]
Blogging on Certs: SCEA Part 1 , Part 2 & 3 , Core Spring 3 , OCAJP , OCPJP beta , TOGAF part 1 and part 2
David O'Meara
Rancher
Joined: Mar 06, 2001
Posts: 13459
posted Oct 21, 2010 20:07:08
0
I was goig to say the same thing. It is not a term I have encountered.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56216
Apparently it's a JSF thingie.
Please be sure to ask JSF questions in the JSF forum. I have moved this post there for you.
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Sridhar Santhanakrishnan
Ranch Hand
Joined: Mar 20, 2007
Posts: 317
Hi Kate,
To create a PhaseListener
1) Implement javax.faces.event.PhaseListener
2) add functionality to the methods beforePhase(PhaseEvent phaseEvent) and afterPhase(PhaseEvent phaseEvent).
Without other details, I am assuming you wouldnt need to add any code to beforePhase(). An empty method should be enough.
In afterPhase(), get the FacesContext object from PhaseEvent . Further get the viewId from the context and do your bit of magic on it.
Hope this gets you started.
subject: Please help to create Phase Listener