Session in Struts

Discussions

Web tier: servlets, JSP, Web frameworks: Session in Struts

  1. Session in Struts (2 messages)

    Hi EveryBody,

    I am a newbie to struts.I am devloping a small login application in Struts. I am using VOs, DAOs in this. I want to maintain a session in when ever the user loggedIN. But i am unable to design where to maintain session and how to retrive it for the next jsp pages. Plz reply me with an example.Its toooooo urgent.... Plz dont forget the example ..

    Threaded Messages (2)

  2. Session in Struts[ Go to top ]

    Its simple as it is.....you maintain the loggedIN in a session inside the action class. Whenever you want to show it on the JSP, retrive it and display it. Whenever you navigate from one JSP to other, get it from the session and display. See it is this simple.
  3. Session in Struts[ Go to top ]

    Use a servlet filter that checks whether the session id is valid. This approach is better than checking whether a variable exists in the session or not. Create a SessionFilter and map it to relevant requests