求救jsp大神 拜托
<%@pagecontentType="text/html;charset=GBK"language="java"errorPage=""%><%@pageimport=...
<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<%@ page import="java.sql.*"%>
<%@ page import="java.awt.*"%>
<%@ page import="java.util.*"%>
<html>
<head>
<title>欢迎</title>
</head>
<body>
<%out.println(new java.util.Date());%>
<%
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=S-T","sa","666666");
Statement stmt=conn.createStatement();
ResultSet rs= stmt.executeQuery("select price from product");
%>
<table bgcolor="#9999dd" border="1" width="300">
<%
while(rs.next()){
%>
<tr>
<td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
</tr>
<%}%>
</table>
<%
try{
stmt.close();
conn.close();
}catch(Exception e){
e.printStackTrace();}
%>
</body>
</html>
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver 展开
<%@ page import="java.sql.*"%>
<%@ page import="java.awt.*"%>
<%@ page import="java.util.*"%>
<html>
<head>
<title>欢迎</title>
</head>
<body>
<%out.println(new java.util.Date());%>
<%
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection conn=DriverManager.getConnection("jdbc:sqlserver://localhost:1433;DatabaseName=S-T","sa","666666");
Statement stmt=conn.createStatement();
ResultSet rs= stmt.executeQuery("select price from product");
%>
<table bgcolor="#9999dd" border="1" width="300">
<%
while(rs.next()){
%>
<tr>
<td><%=rs.getString(1)%></td>
<td><%=rs.getString(2)%></td>
</tr>
<%}%>
</table>
<%
try{
stmt.close();
conn.close();
}catch(Exception e){
e.printStackTrace();}
%>
</body>
</html>
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询