哪位好心人看一下,其中出现了什么错误,能够怎么解决
org.apache.jasper.JasperException: /ch6/user_login.jsp(3,0) The value for the useBean class attribute com.chat.Execute_DB is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1224)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1182)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Generator.generate(Generator.java:3457)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:360)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
问题补充:就是在链接这个页面的时候出错了
用户登陆验证//设置数据格式
request.setCharacterEncoding("gb2312");
//用户是否登录的布尔变量
boolean isLogin = true;
//以微秒值返回当前时间
java.util.Date NowDate = new java.util.Date();
long l_LoginTime = NowDate.getTime();
//获取用户填写的登录信息
String str_UserName = request.getParameter("UserName");
String str_UserPassword = request.getParameter("UserPassword");
//查找提交的用户名是否存在
String strSql = "select * from users where UserName like '"+str_UserName+"'";
ResultSet rs = Ex.exeSqlQuery(strSql);
if(rs.next())
{
//用户名已经存在
int i_ID = rs.getInt("ID");
String str_UserPassword1 = rs.getString("UserPassword");
long l_LastTime = rs.getLong("LoginTime");
rs.close();
//登录成功后密码将被保存15天
if((l_LoginTime-l_LastTime)> 15*24*3600*1000)
{
strSql = "update users set LoginTime = '"+l_LoginTime+"', UserPassword = '"+str_UserPassword+"' where UserName like '"+str_UserName+"'";
Ex.exeSql(strSql);
}
else
{
//用户名存在但是密码错误的情况
if(str_UserPassword.compareTo(str_UserPassword1)!=0)
{
isLogin = false;
}
else
{
strSql = "update users set LoginTime = '"+l_LoginTime+"' where UserName like '"+str_UserName+"'";
Ex.exeSql(strSql);
}
}
}
else
{
//用户名不存在,添加新用户到数据库
rs.close();
strSql = "insert into users(UserName,UserPassword,LoginTime) values ('"+str_UserName+"','"+str_UserPassword+"','"+l_LoginTime+"')";
Ex.exeSql(strSql);
}
if(!isLogin)
{
%>
您的输入的用户名或者密码有误,请重新输入
}
else
{
//统计不同聊天室中的人数
int room1_num = 0;
int room2_num = 0;
int room3_num = 0;
//获取休闲娱乐版内的人数
strSql = "select ID from userlist where ChatRoom like 'xiuxian'";
rs = Ex.exeSqlQuery(strSql);
while(rs.next())
{
room1_num++;
}
rs.close();
//获取缘分天空版内的人数
strSql = "select ID from userlist where ChatRoom like 'yuanfen'";
rs = Ex.exeSqlQuery(strSql);
while(rs.next())
{
room2_num++;
}
rs.close();
//获取谈天说地版内的人数
strSql = "select ID from userlist where ChatRoom like 'tantian'";
rs = Ex.exeSqlQuery(strSql);
while(rs.next())
{
room3_num++;
}
rs.close();
%>
欢迎 光临 |
---|
请选择聊天室: 休闲娱乐 (人) 缘分天空 (人) 谈天说地 (人) |
}
%>
问题补充:
一口三个汉堡 写道
user_login.jsp(3,0) The value for the useBean class attribute
这里出问题了,在(3,0)的地方,你去看看,你的代码3,0的位置是什么状况。
(3,0)是哪个地方???