大家好,我是JSP新手,请大家帮忙看一下以下代码哪里有错,谢谢
<%@ page import="java.sql.*" contentType="text/html;charset=gb2312" %>
<%
out.println("从这里开始是正确的<br>");
%>
<%
String url="jdbc:odbc:LBSource";
String username="LUser";
String password="2222222";
try
{
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(Exception e)
{
  out.println("some wrong have happen in forname");
}
try
{
  Connection con=DriverManager.getConnection(url,username,password);
}
catch(Exception e)
{
   out.println("some wrong have happen in getconnection");
}
  
try
{
   Statement stm=con.createStatement();
}
  
  catch(Exception e)
  {
    out.println("some wrong have happen in createstatement");
    con.close();
  }
try
{
  String sql="select * from book_table where bookid>3";
  ResultSet rs=stm.executeQuery(sql);
}
  catch(Exception e)
  {
   out.println("some wrong have happen in executequer");
   stm.close();
   con.close();
  }
  
%>
<%
out.println("<br>如果你能看到这里,就那行了");
%>运行的时候出错提示如下
An error occurred at line: 5 in the jsp file: /connect.jsp
Generated servlet error:
con cannot be resolved