1 2 Previous Next 17 Replies Latest reply on Feb 4, 2009 5:22 AM by clerum Go to original post
      • 15. Re: Client IP Address

        This is an interesting topic but to answer your first question on how to get remoteAddress you can define a factory in component.xml


        <factory name="remoteAddr" value="#{facesContext.externalContext.request.remoteAddr}" />



        You can then inject remoteAddr in your component.


        @In("remoteAddr")
        String remoteAddress



        Is there a reason why you outjected sfc to SessionScope and injected without a scope?

        • 16. Re: Client IP Address
          clerum

          Well sfc never gets altered and I was thinking that once a component has a scope it is maintained? Also I don't outject it so I don't think anything happens to it...


          would that cause a problem?

          • 17. Re: Client IP Address
            clerum

            I think thats where you got lost.


            I wasn't injecting the sfb component. I was injecting the sfc and elog components.


            the sfb component was being created by the constructor and thus bijection wasn't getting applied.

            1 2 Previous Next