<%
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
String url="jdbc:mysql://localhost/database_name?user=user_name&password=type_password&useUnicode=true&characterEncoding=8859_1";
Connection conn= DriverManager.getConnection(url);
Statement stmt=conn.createStatement();
.
.
.
.
%>
like that it goes.........
Hop it will help u.......
That is the old MySQL driver, and is only still present in the distribution for backwards compatability. Use, as the first reply indicated, com.mysql.jdbc.Driver instead of org.gjt.mm.mysql.Driver
Edit: Also,remove all of that scriptlet stuff out of that JSP. It does not belon there. Put it into a bean or some other external object. Anywhere but as a scriptlet in the JSP.
Edit Again:
And DAMN, I didn't notice that this was some ancient post reanimated every two years.
nikhita. The OP made the post four years ago. And the last reply before yours (and mine, unfortunately) was two years ago. I don't think anybody is waiting on an answer anymore.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494