Menu

spring singleton -> jsf application scope

Users
tony_k
2005-09-23
2013-04-08
  • tony_k

    tony_k - 2005-09-23

    i have a singleton bean managed by spring, let's call it B1.

    i want to reference this bean from a jsf page, as in:

    <h:outputText value="B1.field1=[#{B1.field1}]" />

    with spring-jsf do i even have to mention it in a faces-config.xml file as a managed-bean?

    if yes, what would the managed-bean definition look like in M2, if no "psyched" and never mind ;)

    thanks...

     
    • Thomas Jachmann

      Thomas Jachmann - 2005-09-23

      Hi Tony,

      have you tried this? Because actually, it does work. Just define your beans either in applicationContext.xml or faces-config.xml and access them from your jsf pages:

      <h:outputText value="#{B1.field1}" />

      You only have to double define a bean if you want to have a spring bean with session or request scope.

      HTH,
      Thomas

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.