本帖最后由 csdnstar 于 2013-03-25 20:46:55 编辑

解决方案 »

  1.   

    没有为userbs注入值,当然为空了。
      

  2.   

    <application>
            <variable-resolver>
           org.springframework.web.jsf.DelegatingVariableResolver
            </variable-resolver>
    </application>加在faces-config.xml内看下
      

  3.   

    还要在web中加:
      <listener>
          <description>spring容器初始化配置</description>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
       </listener>
       
       <listener>
                <description>拦截请求,注入对应的bean</description>
     <listener-class>org.springframework.web.context.request.RequestContextListener  </listener-class>  
      </listener>