I'm not sure if it matters, but have you tried rewriting the code with the following:
<%@ page import = "java.io.*, java.sql.*" %> in place of the page element defined below? I've never seen anyone split up imports into different statements. Also, as a side note, you don't need to import java.lang. Bill Dimmick Hiddenmind Technology -----Original Message----- From: fusterjj [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 11:32 AM To: 'Tomcat Users List' Subject: code!! This is the code where I have allocated the driver, when compiled does not give me any error the problem is when I open the file after put in it in the tomcat folder. <%@page contentType="text/html"%> <html> <head> <%@ page import = "java.io.*" import = "java.lang.*" import = "java.sql.*" %> <title>JSP Page</title> </head> <body> <h1>JSP Example 3</h1> <%-- <jsp:useBean id="beanInstanceName" scope="session" class="package.class" /> --%> <%-- <jsp:getProperty name="beanInstanceName" property="propertyName" /> --%> <% String place; Connection dbconn; ResultSet results; PreparedStatement sql; try { Class.forName("org.gjt.mm.mysql.Driver"); try { int latitude,longitude,easting,northing; boolean doneheading = false; dbconn = DriverManager.getConnection("jdbc:mysql://localhost:3306/prueba?user=fusterj j&password=juanjo"); place = request.getParameter("place"); sql = dbconn.prepareStatement("SELECT * FROM DB1 = '" + place + "'"); results = sql.executeQuery(); while(results.next()) { if(! doneheading) { out.println("<table border=2>"); doneheading = true; } latitude = results.getInt("latitude"); longitude = results.getInt("longitude"); easting = results.getInt("easting"); northing = results.getInt("northing"); out.println("<tr><td>" + latitude); out.println("<td>" + longitude); out.println("<td>" + easting); out.println("<td>" + northing); } if(doneheading) { out.println("</table>"); } else { out.println("No matches for " + place); } } catch (SQLException s) { out.println("SQL Error<br>"); } } catch (ClassNotFoundException err) { out.println("Class loading error"); } %> </body> </html> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>