File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Application scope attribute listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Application scope attribute listener" Watch "Application scope attribute listener" New topic
Author

Application scope attribute listener

Maurizio Nagni
Ranch Hand

Joined: May 29, 2004
Posts: 75
I have a JSF application. In the faces-config I have defined


then I created a class (implementing the proper methods)


and I declared it in the web.xml



The question is:
Why I cannot see the appHandler class added to the Application scope?

in the ServletContextAttributeListener.attributeAdded method I have implemented simple code like


but no messages about the appHandler appear. Hints?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Your message is not related to SCWCD, so I move it to a relevant forum.


[My Blog]
All roads lead to JavaRanch
Ryan Lubke
Ranch Hand

Joined: Jun 20, 2007
Posts: 36
Originally posted by Maurizio Nagni:
I have a JSF application. In the faces-config I have defined


then I created a class (implementing the proper methods)


and I declared it in the web.xml



The question is:
Why I cannot see the appHandler class added to the Application scope?

in the ServletContextAttributeListener.attributeAdded method I have implemented simple code like


but no messages about the appHandler appear. Hints?



Managed beans will only be created the first time they
are referenced within a view (i.e. #{appHandler}). This
is why your attribute listener isn't printing anything.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application scope attribute listener