jQuery in Action, 2nd edition*
The moose likes JSF and the fly likes JSF2 Invoke Method on Application Startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF2 Invoke Method on Application Startup" Watch "JSF2 Invoke Method on Application Startup" New topic
Author

JSF2 Invoke Method on Application Startup

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
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

Joined: Jun 25, 2001
Posts: 15960
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF2 Invoke Method on Application Startup
 
Similar Threads
Which version of JBOSS supports JSF 2.0?
[JSF 1.1] Asynchronous JSF Update
Getting /resources in a BackedBean to send mails
passing parameter
<h:dataTable column size problem