I'm writing a webapp that can be accessed through several different JSP pages. I'm using Session scope since I assume that there can be seve开发者_StackOverflow社区ral different sessions active.
If I knew I had one entry to the app I would has probably used the constructor of that bean as an initialization indicator but each JSP page uses a different Bean so I'm not sure how get the Session Initialized Event.
Any JSF Session Listeners that can be defined in faces-config.xml that I missed?
Thanks! (P.S - Working with JSF 1.2 Currently)
Sessions are not a JSF concept. They are a general web concept. Hence the servlet-api gives you the HttpSessionListener.sessionCreated(..)
. You should map it with <listener>
in web.xml.
Maybe you're looking for a HttpSessionListener. See this example.
精彩评论