1 2 Previous Next 15 Replies Latest reply on Sep 22, 2009 1:43 AM by swd847 Go to original post
      • 15. Re: Outjecting session-scope object from servlet filter
        swd847

        Firstly don't use outjection in application scoped components, it is not threadsafe. Use Contexts.getSessionContext().put() instead.


        As Pete said if you inherit from org.jboss.seam.web.ContextFilter you will have access to the session context inside the filter, however this is normally used to provide the contexts to an external servlet, not to start the seam lifecycle earlier than usual. I am almost certain this will give you errors when seam tries to end its lifecycle twice (at a guess line 368 of Manager.java) but it may be worth a try.


        the simple solution is to use


        session.setAttribute("user",user)
        

        1 2 Previous Next