2 Replies Latest reply on Apr 29, 2010 4:12 PM by sean.tozer

    Guidance to create session in seam

    vasukihn

      Hello,


      I am a newbie to seam. Guide me in creating a session in seam and accessing the variable through session.


      My current scenario is, login page will be there and after entering the user credentials in login page, i want to store the user in session and pass on the session userto other pages to display the name everywhere. Can anyone help me in completing  this task?


      If possible provide me an examle to understand.


      Thanks
      Vasuki

        • 1. Re: Guidance to create session in seam
          tausuahmed

          Hi vasuki,


          I hope you are using seam provided identity management, if it is the case you will have loggedin username already associated with session ( Identity.instance().getCredentials().getUsername()).


          If you want to show other information to be displayed in every page then you must create one session scope class at startup where you build information and set it to some variable, access that variable whereever required.




          Regards,


          Tauseef

          • 2. Re: Guidance to create session in seam
            sean.tozer

            You seem to have had quite a few very basic issues posted to these forums recently. Have you tried using seam-gen to create a functioning project, which includes login and sessions and conversations and all that jazz? It basically provides all the examples of things you've been asking for.