TOMcat6.0报错

来源:百度知道 编辑:UC知道 时间:2024/06/07 19:57:47
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: 32 in the jsp file: /index.jsp
root cannot be resolved
29: java.sql.ResultSet rs=null;
30:
31: conn=java.sql.DriverManager.getConnection(
32: "jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK",root,null);
33: stm=conn.createStatement();
34: rs=stm.executeQuery("select * from myuser");%>
35: <% while(rs.next())

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispa

500 Server Internal Error
服务器遇到了未知的情况,并且不能继续处理请求。客户端可以显示特定的错误情况,并且可以在几秒种以后重新尝试这个请求。
如果这个情况是临时的,服务器应当在Retry-After头域标志客户端过多少秒钟之后重新尝试这个请求。

jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK",root,null);

root加"" null改成 ""

jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GBK","root","");

myeclipse最高支持1.5 你用1.6编译

如果有1.6新出的功能 myeclipse是不能解析的。

应该把 错误发全好找 ,HTTP Status 500 -

只报个 500 ,去哪找啊 。

web你设置 1.5 ,可 用的jdk是1.6 ,jdk 有这个

功能吗?按你说的 1.6 却按 1.5的编译 ,我还没

遇见过。web 项目选择的那个版本 ,管不到jdk

这个问题 ,像选择 1.5 ,他会默认的把 JSTL加到

库文件中去,1.4就不行,和jdk版本无关。

Unable to compile class for JSP ==> jsp编译错误,请检查源代码啊。

Unable to compile class for JSP ==> jsp编译错误,请检查源代码啊。二楼的说的好,指出了是什么错误,能说明下通常什么原因引起上面的错误?
我按二楼的改过了,还是不行!郁闷
The import java.sql.Statement is never used这是什么意思?