1 Reply Latest reply on Feb 5, 2010 8:19 AM by Stan Silvert

    How to call function upon loading of JSF Context

    Jigar Joshi Newbie

      IN JSP i used to put things in bean's constructor which is in APPLCIATION scope,
      similarly
      i want to load a function upon deploy of application where i can put .

      i tried putting in listener but @ that time i am not getting faces config 's injection .

      so is there any way out ?

       

       

      here is my faces-config

      1. <?xml version='1.0' encoding='UTF-8'?> 
      2.  
      3. <!-- =========== FULL CONFIGURATION FILE ================================== --> 
      4.  
      5. <faces-config version="1.2"  
      6.     xmlns="http://java.sun.com/xml/ns/javaee"  
      7.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
      8.     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
      9.     <managed-bean> 
      10.         <managed-bean-name>bookBean</managed-bean-name> 
      11.         <managed-bean-class>DataBean</managed-bean-class
      12.         <managed-bean-scope>application</managed-bean-scope> 
      13.     </managed-bean> 
      14. </faces-config> 

      here is my bean