0 Replies Latest reply on Mar 31, 2008 6:21 AM by sara isa

    SESSIONs in servlet

    sara isa Newbie

      hi all,

      my question's related with saving some data (i.e. users) in sessions, so that each user can see only his/her info. Guys, pleease, help to create session to save SmdUser datas.

      here is the code snippet(by checkLogin i check the username/psw in active directory. but it doesn't create a session..):

      public Long checkLogin(String username, String password) throws Exception {
      LoginRemote loginRemote =(LoginRemote)
      SmdUser smdUser = loginRemote.checkLogin(username, password);
      Long res = null;
      if (smdUser != null) {
      res = 0L;

      HttpSession session = getThreadLocalRequest().getSession(true);
      session.setAttribute("user", smdUser);
      if (session != null) {

      } else {
      res = 1L;
      return res;

      thank you in advance, lema