PDA

View Full Version : jsp: Troubles with generating at body tag.


scaramanga
February 4th, 2003, 10:47 AM
My page stops generating when it reaches the body tag. I don't get any errors so I don't have a clue about what's wrong. Here's my code.

<html>
<head>
<title>titel</title>
</head>

<body>
<%@ page import="java.net.URL" %>
<%@ page import="java.sql.*" %>

libraries worden geladen.

<% String url = "jdbc:odbc:odbc_exmp";
try{
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection (url, "", "");
Statement stmt = con.createStatement();
ResultSet result = stmt.executeQuery("Select * FROM Names;"); %>
<table border=10>
<tr>
<%while (result.next()) {%>
<tr>
<% result.getString("First_name"); %> </tr> <%}
}
catch (Exception e) {
e.printStackTrace();
}
%>
</body>
</html>