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出不来...刚刚学,很模糊,请高手分析下可能是什么原因!谢谢
去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出不来...刚刚学,很模糊,请高手分析下可能是什么原因!谢谢
解决方案 »
- Hibernate 传参失败
- select top 1 * 不起作用
- poi生成excel文件时报OutOfMemory异常!
- 鼠标事件
- jsp连接远程oracle8i出现异常,求解
- 用dreamweaver开发jsp编程,这两句是什么意思?谢谢。
- java如何实现应用程序的监控
- form问题
- 怎么我老是连接不上数据库啊!急!
- 在jsp中可以调用ActiveX组件吗?
- [Microsoft][SQLServer 2000 Driver for JDBC]Can't start a cloned connection while in manual transaction mode.
- 请求高手帮助:严重: Exception sending context initialized
一开始class.后面虽然能点出来,没有注意区别大小写,谢谢!以后我一定会更认真些的~!谢谢