|
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.
|