java web 里面 class.forname() 的 .forname()为什么出不来?
java web 里面 class.forname() 的 .forname()为什么出不来?
去google,百度搜索过了,没有找到合理的答案.
代码如下:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="java.sql.*">
<html>
<head>
<title>欢迎光临新式达网吧</title>
</head>
<body>
<center>
<%! String DBDRIVER ="sun.jdbc.odbc.JdbcOdbcDriver";
String DBURL ="jdbc:odbc:XSD";
Connection conn =null;
PreparedStatement PS =null;
ResultSet RS =null;
%>
<%
boolean flag=false;
String id = request.getParameter("id") ;
String password = request.getParameter("password") ;
%>
<%
String sql="select XSD_User from XSDUser where XSD_User=? and XSD_UserPassword=?";
try{
}
catch(Excepiton e)
{}
%>
<h1>欢迎光临新式达网吧---留言系统</h1>
<br><br>
<form method="post">
</form>
</center>
</body>
</html>
这是自己刚刚学jsp ,好奇想自己模拟写个网吧留言系统.想问问各位高手,try{里面写class.forname(DBDRIVER)},但是forname出不来...刚刚学,很模糊,请高手分析下可能是什么原因!谢谢