sql server2000 jdbc连接问题~大家帮忙!
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /web/flysky/regist.jsp(9,0) The value for the useBean class attribute opendb.opendb is invalid.
这个是怎么回事啊?
下面是opendb.java
和注册页面regist.jsp
我放在了Tomcat的Tomcat 6.0\webapps\ROOT\
regist.jsp
<%@ page
language= "java "
contentType= "text/html; charset=UTF-8 "
pageEncoding= "UTF-8 "
import = "java.util.* "
import = "java.sql.* "
%>
<META http-equiv= "Content-Type " content= "text/html; charset=UTF-8 ">
<jsp:useBean id= "RegisterBean " scope= "page " class= "opendb.opendb " />
<%
String id=request.getParameter( "id ");
String password=request.getParameter( "password ");
if ((id==null)||(password==null))
{
%>
<p> 用户名和密码不能为空! </p>
<input type= "button " value= "返回修改 " onclick= "histroy.back() ">
<%
}
else
{
String sql= "select * from user where id= ' "+id+ " ' ";
System.out.println( "sql::: "+sql);
ResultSet rs=RegisterBean.executeQuery(sql);
if (rs.next())
{
rs.close();
session.putValue( "register_message ", "duplicate name foung! ");
%>
<script language=javascript>
window.location= "info.jsp?str=用户 <%=id%> 已经存在 "
</script>
<%
}
else
{
rs.close();
%>
<form method= "post " action= "register2.jsp ">
<input type= "hidden " name= "id " value= " <%=id%> ">
<input type= "hidden " name= "password " value= " <%=password%> ">
请检查您的注册信息 <br> <br>
<table width= "60% " border= "1 ">
<tr>
<td>
账号:
</td>
<td>
<%=id%>
</td>
</tr>
<tr>
<td>
密码:
</td>
<td>
<%=password%>
</td>
</tr>
</table>
<br>
<input type= "submit " value= "提交注册 ">
<input type= "reset " value= "返回修改 " onclick= "histroy.back() ">
</form>
<%
}
%>
</center>
<%
}
%>
</body>
</html>
opendb.java