[求助]连接数据库问题、谢谢了
org.apache.jasper.JasperException: Exception in JSP: /mysql.jsp:13
10: String tablename="goods";
11: String url="jdbc:mysql://localhost/"+dbname+"?user="+userName+"&password="+userpwd;
12: Class.forName("com.mysql.jdbc.Driver").newInstance();
13: java.sql.Connection conn=DriverManager.getConnection(url);
14: out.print("数据库连接成功!");
15: %>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:467)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
就是一个简单的连接数据库的