<%@ page import = "java.sql.*" %>
<html>
<body>
<b>Seus usuarios são:</b>
<%
Class.forName("com.mySQL.jdbc.Driver");
Connection con = DriverManager.getConnection(
"jdbc:mySQL://localhost:3306/mySQL?useUnicode=true",
"root",
"root");
Statement stm = con.createStatement();
ResultSet res = stm.executeQuery("select user from user");
while (res.next()){
out.println(res.getString(1)+"<br>");
}
res.close();
%>
</body>
</html>
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mySQL.jdbc.Driver
root cause
java.lang.ClassNotFoundException: com.mySQL.jdbc.Driver
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 3.0.1 logs.
GlassFish Server Open Source Edition 3.0.1