Storing state

Discussions

EJB programming & troubleshooting: Storing state

  1. Storing state (2 messages)

    Hi all,
       I have a requirement wherein i need to store session data (as cited below in the example) in my JSP. There are many ways as everyone knows to do it - HTTPSessions,Stateful Session Bean , and using Java Beans.
    For Instance ,
    The jsp contains 3 tabs.One of the tabs looks like this -
    User Details -
    1.User Name
    2.User Address
    3.User Email Id
    4.User Mobile No.
    As the client navigates across the tabs , the data has to be stored somewhere.
    My question is -
    which is the best possible way to store these details -
    should i go for Stateful Session Beans or Java Beans.

    All suggestions are welcome .



    Threaded Messages (2)

  2. Storing state[ Go to top ]

    Hi Sujith,
      If you don't have big information then store it in HTTP session, bez stateful session bean can do this but for each session it will create a new bean insatnce and hold that instance for longer time.
      Even you can store in some temp data also.

      The best way is
       less info or lighter object store in HTTP session else go for session bean.

    Bye

    Arun
  3. Storing state[ Go to top ]

    Hi Arun,
    I have big information in my jsps.
    So , i think it is not proper to go for HTTP Sessions as i read in many articles.
    The alternatives that are left behind are Java Beans and EJB Stateful Session Beans.
    Thanks,
    Sujith