I was Writing a code to connect data base and add the following code to my action.java
Connection connection=getConnection("UserBook","UserBook123","catalog","localhost");
String sql="select BookName from book";
PreparedStatement ps=null;
ps=connection.PreparedStatement(sql);
ResultSet set=ps.executeQuery();
while(set!=null&&set.next()) {
System.out.println(set.getString("BookName")); }
connection.close();
the error i get is "The method PreparedStatement(String) is undefined for the type Connection"
Need to know how i can resolve this problem