- 论坛徽章:
- 0
|
代码片断为:
- Class.forName("org.gjt.mm.mysql.Driver").newInstance();
- String url =jdbc:mysql://localhost/sampdb?user=aini3001&password=aini3001&useUnicode=true&characterEncoding=GB2312;
- Connection conn= DriverManager.getConnection(url);
- Statement stmt=conn.createStatement();
复制代码
错误提示为:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 4 in the jsp file: /test.jsp
Generated servlet error:
[javac] Compiling 1 source file
/usr/local/jakarta-tomcat-4.1.31/work/Standalone/localhost/_/test_jsp.java:48: ';' expected
An error occurred at line: 4 in the jsp file: /test.jsp
Generated servlet error:
String url =jdbc:mysql://localhost/sampdb?user=aini3001&password=aini3001&useUnicode=true&characterEncoding=GB2312;
^
1 error
......
不知什么原因,如何解决? |
|