Login

Hi I’m trying to write my custom login to Tamino using Java(server side), Java Beans and JSP, everyting works well, it authenticates during the fist logon. But if I type in the correct user and password and I come back again to type in the wrong user and password it will go in. the values I type (user and password) are stored in a bean
What I’m doing wrong? I’m using Tamino as my back end.

Code snippet
logon.jsp (1.95 KB)

Hi KB,
I’m don’t fully understand the context of your jsp page, but this might help…

When you validate your userid/password
as shown below…

code:

if ((beanLogon.equals(uid)) && (beanPass.equals(passW)) ){
String compId = ush.getCompanyId(uid);
String fnam = ush.getUser(uid);
user.setCompId(compId);
user.setFirstName(fnam);
user.setlogonId(usr.getLogonId());
user.setFirstName(usr.getFirstName());
out.print(compId);
} else {
%>Not User
<%
}


…you don’t reset the bean variables in the case of an invalid logon. So in this case, if you already made a valid logon previously, won’t the bean persist the valid values? To fix this, try resetting the bean variables in the else{} block after invalid logon is detected (e.g. user.setlogonId(" "):wink:

Hope it helps.