<body>
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*,java.io.*" %>
<html>
<head>
<title>连接数据库</title>
</head>
<body>
<img src=baner.jpg width=100%>
<div align="center"><strong>通过纯Java驱动程序连接数据库</strong></div>
<%
String driverName="com.mysql.jdbc.Driver";//驱动程序名
String userName="root";//数据库用户名
String userPasswd="1234567";//密码
String dbName="test";//数据库名
String tableName="asd";//表名
//连接字符串
String url="jdbc:mysql://localhost:3306/"+dbName+"?user="+userName+"&password="+userPasswd;
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection conn=DriverManager.getConnection(url);
out.println("<center><font color=red size=7>数据库连接成功</font></center>");
conn.close();
%>
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
我写了个jsp页面,然后改动了一下,改动的内容就是在jsp页面的js函数里加了个alert()语句,但是我访问这个页面时,死活都是原来页面的内容,我加了很多alert函数还是没改动前的页面内容;tomcat重启了,也重新部署这 ......