This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help to create Phase Listener

 
Kate Something
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kate,
Welcome to CodeRanch!

What is a phase listener?
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was goig to say the same thing. It is not a term I have encountered.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sridhar Santhanakrishnan
Ranch Hand
Posts: 317
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic