关于jsp连接access数据库不成功问题,求高手看看。
错误信息如上:
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: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] D:\winxp\Tomcat 4.1\work\Standalone\localhost\_\holle_jsp.java:58: illegal escape character
[javac] String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb ";
[javac] ^
[javac] D:\winxp\Tomcat 4.1\work\Standalone\localhost\_\holle_jsp.java:58: illegal escape character
[javac] String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb ";
[javac] ^
[javac] 2 errors
[解决办法]
jsp文件不能正常编译,好象你的驱动写错了吧,jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\jsp\jxsjk.mdb "这种写法我没有见过哦!
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
Connection con=DriverManager.getConnection( "jdbc:odbc:数据源名字 ");
[解决办法]
贴代码出来看看
[解决办法]
String MM_conn3_STRING = "jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\jsp\\jxsjk.mdb ";
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html