help find error that connection database and jsp..
<%
String connectionURL = "jdbc:mysql ://localhost:3306/webaudio?user=r oot";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html>
<head></head>
<body>
<table>
<tr align="center"> <td align="center">
<%
Class.forName(" com.mysql.jdbc. Driver").newIns tance();
connection = DriverManager.g etConnection(co nnectionURL, "root", "123");
statement = connection.crea teStatement();
rs = statement.execu teQuery("SELECT name FROM audio");
out.println("<t able border=1>");
out.println("<t r><td>Audio In Database</td></tr>");
while (rs.next())
{
out.println("<t r><td>");
String file = rs.getString("n ame");
if((file!=null) )
{
out.println("<a href=rtsp://554@localhost/test/" + file + ">");
out.println(fil e + "<br>");
out.println("</a></td></tr>");
}
}
out.println("</table>");
rs.close();
%>
</td>></tr>
</table>
</body>
<html>
<%
String connectionURL = "jdbc:mysql ://localhost:3306/webaudio?user=r oot";
Connection connection = null;
Statement statement = null;
ResultSet rs = null;
%>
<html>
<head></head>
<body>
<table>
<tr align="center"> <td align="center">
<%
Class.forName(" com.mysql.jdbc. Driver").newIns tance();
connection = DriverManager.g etConnection(co nnectionURL, "root", "123");
statement = connection.crea teStatement();
rs = statement.execu teQuery("SELECT name FROM audio");
out.println("<t able border=1>");
out.println("<t r><td>Audio In Database</td></tr>");
while (rs.next())
{
out.println("<t r><td>");
String file = rs.getString("n ame");
if((file!=null) )
{
out.println("<a href=rtsp://554@localhost/test/" + file + ">");
out.println(fil e + "<br>");
out.println("</a></td></tr>");
}
}
out.println("</table>");
rs.close();
%>
</td>></tr>
</table>
</body>
<html>
Comment