auto -instantiate a session bean?

前端 未结 2 643
别那么骄傲
别那么骄傲 2021-01-21 15:38

I have a session bean


  vdcAddBean
  com.cloud.appsportfolio.js         


        
相关标签:
2条回答
  • 2021-01-21 16:21

    Replace

    <value>#{sessionScope.vdcAddBean}</value> 
    

    by

    <value>#{vdcAddBean}</value> 
    

    to get JSF to autocreate the bean.

    0 讨论(0)
  • 2021-01-21 16:28

    JSF managed session beans are stored within the ExternalContext, you can retrieve a map with all of them using the following method, getSessionMap.

    The key to this map should be the managed-bean-name, so perhaps you can check for null and if so then try instantiating your bean and putting it directly into the sessionMap?

    0 讨论(0)
提交回复
热议问题