i had all the requiements that are needed for connecting the mysql.i connected the mysql using the procedure given in the MyEclipse documents.I wrote jsp code to connect the mysql but that code is not connecting to the database.my code is given bellow
<%@ page language=”java” import=”java.sql.*”%>
<html>
<head><title>Read from mySQL Database</title>
</head>
<body>
<%
try{
System.out.println(“Connecting to data base”);
Class.forName(“com.mysql.Driver”);
Connection con=null;
Statement stmt=null;
con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/test”,”root”,”root”);
System.out.println(“Connected to data base”);
stmt=con.createStatement();
String vsql=”create table kishan(k_id integer(3) primarykey,k_name varchar(20))”;
stmt.executeQuery(vsql);
out.println(“created table”);
}
catch(Exception e)
{
System.out.println(e);
}
%>
</body>
</html> IS THEIR ANY PROCEDURE TO CONNECT THE CODE USING JSP IN MYECLIPSE.