Javabean调试出错,请各位大侠帮帮忙

kimmel520 2003-04-08 10:34:59
package login;
import java.util.*;
public class LoginProcessor{
private Hashtable userTable;
private Hashtable currentLogins;
public LoginProcessor(){
userTable=new Hashtable();
userTable.put("user1","pass1");
userTable.put("user2","pass2");
userTable.put("user3","pass3");
currentLogins=new Hashtable();
}
public boolean alreadyLoggedIn(UserInfo userinfo) {
boolean loggedIn=userinfo.getLoggedIn();
return loggedIn;
}
public boolean keepAlive(UserInfo userinfo,
String pageInfo){
if (!alreadyLoggedIn(userinfo)){
return false;
}
String user=userinfo.getUser();
String sessionId=userinfo.getSessionId();
synchronized(currentLogins){
if (currentLogins.containsKey(user)){
currentLogins.put(user,userinfo.getSessionId());
}
}
return true;
}
public boolean login(UserInfo userinfo){
if (alreadyLoggedIn(userinfo)){
return false;
}
String user=userinfo.getUser();
if ((userTable.get(user)).equals(userinfo.getPassword())){
userinfo.setLoggedIn(true);
currentLogins.put(user,userinfo.getSessionId());
}
return userinfo.getLoggedIn();
}
public void logout(UserInfo userinfo){
currentLogins.remove(userinfo.getUser());
userinfo.setLoggedIn(false);
}
}
出错信息:
symbol : class UserInfo
location: class login.LoginProcessor
public boolean alreadyLoggedIn(UserInfo userinfo) {
^
LoginProcessor.java:17: cannot resolve symbol
symbol : class UserInfo
location: class login.LoginProcessor
public boolean keepAlive(UserInfo userinfo,
^
LoginProcessor.java:31: cannot resolve symbol
symbol : class UserInfo
location: class login.LoginProcessor
public boolean login(UserInfo userinfo){
^
LoginProcessor.java:42: cannot resolve symbol
symbol : class UserInfo
location: class login.LoginProcessor
public void logout(UserInfo userinfo){
^
4 errors
...全文
4 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
zez 2003-04-08
UserInfo类没有引入
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2003-04-08 10:34
社区公告
暂无公告