<%@ page contentType = "text/html;charset=windows-1250" %> <%@ page import="java.sql.*, java.text.NumberFormat" %> <% Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection connection = DriverManager.getConnection("jdbc:mysql://mysql/database?user=user&password=pwd"); Statement statement = connection.createStatement(); ResultSet resultset; resultset = statement.executeQuery("SELECT * FROM table"); while (resultset.next()) { out.print(resultset.getString("id")); out.println("<br />"); } resultset.close(); statement.close(); connection.close(); %>