View Single Post
  #8 (permalink)  
Old 04-09-2008, 08:34 AM
lema lema is offline
Member
 
Join Date: Apr 2008
Posts: 38
lema is on a distinguished road
in fact i want to call one method in servlet part, where the username is checked, like below:

public void checkLogin() throws Exception {
LoginRemote loginRemote =(LoginRemote)
findObject("login.server/login/remote");

String[] username = this.getThreadLocalRequest().getParameterValues("u sername");
String[] password = this.getThreadLocalRequest().getParameterValues("p assword");
String u = username[0];
String p = username[0];

SmdUser smdUser = loginRemote.checkLogin(u, p);
// Long res = null;
if (smdUser != null) {
// res = 0L;
smduser = smdUser;
this.getThreadLocalRequest().getSession(true).setA ttribute("user", smdUser);

} else {
// res = 1L;
}
// return res;
}

so, want to open the main Application page if the login is approved, if not then to open a window alert.
Reply With Quote