aspose file tools
The moose likes JSF and the fly likes Please help to create Phase Listener Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Please help to create Phase Listener " Watch "Please help to create Phase Listener " New topic
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
    
  66

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

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
    
  13

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.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Please help to create Phase Listener
 
Similar Threads
Phase-listener not being called
How can i write in the response through viewhandler? Or even another solution...
Intercepting Filters in Component diagram
multiple phaselisteners
Page Load - is this doable?