[jboss-user] [Beginners Corner] - SESSIONs in servlet
lema
do-not-reply at jboss.com
Mon Mar 31 06:21:27 EDT 2008
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140071#4140071
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140071
More information about the jboss-user
mailing list