<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ÖØÆôÁË£¬Ò²ÖØв¿ÊðÕâ ......