This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF2 Invoke Method on Application Startup

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please in JSf 2 how do i get a method to execute as soon as the Server finishes loading up. I can do this in seam 2, But how do i do same in JSF2
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18092
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can code a ContextListener that will execute as soon as the server has started the webapp. It's not a JSF-specific thing, though. Any J2EE app can use one.

To communicate with JSF, the listener can create application-scope objects. JSF can then address them as backing beans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic