Here is the code i'm trying to execute:
<%@ page import="java.lang.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%
DriverManager.getDriver("jdbc
ostgresql://localhost/Databasename"
;
Class.forName("jdbc
ostgresql"
;
Connection con = DriverManager.getConnection("jdbc
ostgresql://localhost/Databasename", "Administrator"
;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM dates"
;
while( rs.next() )
{
out.println( rs.getString( "field" ) );
}
%>
HERE IS THE ERROR IT GIVES:
cannot resolve symbol
symbol : method getConnection(java.lang.String,java.lang.String)
location: class java.sql.DriverManager
Connection con = DriverManager.getConnection("jdbc
ostgresql://localhost/Databasename", "usrname"
;
Any suggestions would be wonderful. the indicator for this error message points to the period before getConnection, like the period is what it cant resolve???
I'm very new to JSP so any help will be appreciated.
Thanx in advance!
<%@ page import="java.lang.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%
DriverManager.getDriver("jdbc
Class.forName("jdbc
Connection con = DriverManager.getConnection("jdbc
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM dates"
while( rs.next() )
{
out.println( rs.getString( "field" ) );
}
%>
HERE IS THE ERROR IT GIVES:
cannot resolve symbol
symbol : method getConnection(java.lang.String,java.lang.String)
location: class java.sql.DriverManager
Connection con = DriverManager.getConnection("jdbc
Any suggestions would be wonderful. the indicator for this error message points to the period before getConnection, like the period is what it cant resolve???
I'm very new to JSP so any help will be appreciated.
Thanx in advance!