catch error
  1. catch error (1 messages)

    i continue to get this error and am not sure why. I've had the same error in a few areas, so helping here would kill a few birds w/ one stone. thanks alot

    --- the sql query ---

    <% String TitleName;
       ResultSet rset = null;

        String sql =
          "SELECT DISTINCT Left(TitleName,1) as Title " +
    "FROM Titles ";

        try {
          rset = stmt.executeQuery (sql);
        }
        catch (SQLException e) {
          out.println (e);
    return;
        }

        while (rset.next ())
        {
          TitleName = rset.getString ("TitleName");
    %>

    <%= TitleName %>

    --- the error ---

    org.apache.jasper.JasperException: Unable to compile class for JSPC:\bin\tomcat\work\www.smweb.cc_8080\_0002fsourcebook_0002fmaster_0002ftitle_0005fentry_0002ejsptitle_0005fentry_jsp_4.java:138: 'catch' without 'try'.
            } catch (Exception ex) {
              ^
    C:\bin\tomcat\work\www.smweb.cc_8080\_0002fsourcebook_0002fmaster_0002ftitle_0005fentry_0002ejsptitle_0005fentry_jsp_4.java:147: 'try' without 'catch' or 'finally'.
    }
    ^
    C:\bin\tomcat\work\www.smweb.cc_8080\_0002fsourcebook_0002fmaster_0002ftitle_0005fentry_0002ejsptitle_0005fentry_jsp_4.java:147: '}' expected.
    }
     ^
    3 errors

    Threaded Messages (1)

  2. catch error[ Go to top ]

    How about closing the while loop?