Database connection error help me
I am a newbee in jsp development. I am using Oracle JDeveloper 10g as a JSP editor.
i made following code to connect with the database.
<%@ page import="java.sql.*" %>
<%@ page language="java" %>
<%@ page import="mypackage.*" %>
<HTML>
<HEAD><TITLE>Man Get Connected </TITLE></HEAD>
<BODY>
<%
DataAccess daccess=new DateAccess();
Connection conn = null;
Statement st = null;
ResultSet rs = null;
try {
try{Class.forName("com.mysql.jdbc.Driver").newInst ance();
}catch(Exception ex)
{out.println("Driver not found");
}
try{conn = DriverManager.getConnection("jdbc:mysql://localhost/menageris?user=root&password=teralight");
}catch(Exception ex)
{
out.println("Driver Manager not Connected");
}
st = conn.createStatement();
rs = st.executeQuery("select * from company");
while(rs.next())
{
%>
<%= rs.getString("name") %><br>
<%
}
}
catch(Exception ex) {
out.println("connection not found");
}
%>
</BODY>
</HTML>
And found exception as:
----->>>>>>>> Driver not found
plz help me in dealing with that
have I made any change in JDeveloper,path setting etc
|