import="java.sql.*"%>
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
My JSP 'check.jsp' starting pageClass.forName("com.mysql.jdbc.Driver");
Connection con= DriverManager.getConnection("jdbc:mysql://localhost:3306/test",
"root","just");
Statement stat= con.createStatement();
运行之后是····
org.apache.jasper.JasperException: Exception in JSP: /check.jsp:30
27:
28:
29:
30: Class.forName("com.mysql.jdbc.Driver");
31: Connection con= DriverManager.getConnection("jdbc:mysql://localhost:3306/test",
32: "root","just");
33: Statement stat= con.createStatement();
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
为什么不行啊??已经折腾我好久了····
展开