if(myResultSet.next()) //如果有记录
{
  ....
}

解决方案 »

  1.   

    用System.out.println("error");不行吗
      

  2.   

    用while比较好。
    try 
    {
    while(myResultSet.next()) //如果有记录
    {
      ....

    }
    catch(Exception e){
       System.out.println(e);
    }
      

  3.   

    (copy)
    By default, they will go to the console where the tomcat is started. You have to modify the startup scripts to redirect them to appropriate files. See Tomcat Mailing List(http://mikal.org/interests/java/tomcat_users/msg03276.html) for a discussion on how to redirect the System.out and System.err. 
    On the other hand, if you are running Tomcat as an NT Service, you can modify the conf/wrapper.properties file and set wrapper.stdout and wrapper.stderr properties to point to your log files.
      

  4.   

    用System.out.println("error");不行吗 
    的确有问题