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)
findObject("server/login/remote");
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) {
testSession();
}
} else {
res = 1L;
}
return res;
}
thank you in advance, lema