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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31085
    
163

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: 61774
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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://aspose.com/file-tools
 
subject: Please help to create Phase Listener