当前位置: 技术问答>java相关
我的jsp连接数据库时,出现以下错误呀!
来源: 互联网 发布时间:2015-03-15
本文导语: Sqlserver.java文件编译成功 进行数据查询时出错如下: 500 Servlet Exception /sqlserver/view1.jsp:22: 'catch' without 'try'. } catch (java.lang.Throwable _jsp_e) { ^ /sqlserver/view1.jsp:27: '}' expected. } ^ /sqlserver/view1.jsp...
Sqlserver.java文件编译成功
进行数据查询时出错如下:
500 Servlet Exception
/sqlserver/view1.jsp:22: 'catch' without 'try'.
} catch (java.lang.Throwable _jsp_e) {
^
/sqlserver/view1.jsp:27: '}' expected.
}
^
/sqlserver/view1.jsp:29: Statement expected.
private com.caucho.java.LineMap _caucho_line_map;
^
3 errors
进行数据查询时出错如下:
500 Servlet Exception
/sqlserver/view1.jsp:22: 'catch' without 'try'.
} catch (java.lang.Throwable _jsp_e) {
^
/sqlserver/view1.jsp:27: '}' expected.
}
^
/sqlserver/view1.jsp:29: Statement expected.
private com.caucho.java.LineMap _caucho_line_map;
^
3 errors
|
你错的不是你贴出来的程序Sqlserver.java 而是另为一个文件view1.jsp
|
检查你的左右大括号是否匹配
|
是花括号不匹配的原因!