2
在運行Pregister.jsp文件,它顯示follwing聲明不能被解析爲一個JSP文件類型
An error occurred at line: 31 in the jsp file: /pregister.jsp
Statement cannot be resolved to a type
PreparedStatement cannot be resolved to a type
我的代碼
try {
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:xe","system","system");
Statement st=con.createStatement();
String query="select email from patient where email=? ";
PreparedStatement ps=con.prepareStatement(query);
ps.setString(1, pemail);
可以在任何一個告訴我,爲什麼我得到這個錯誤還建議我如何解決這個錯誤。這個文件放在tomcat下的webapps下。請提出這個解決方案