出错,但他提示的地方没有错,不明白错那了

来源:8-6 所有商品信息显示

qq_lzY

2016-11-04 09:36

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: 1 in the generated java file
The type entity.Items cannot be resolved. It is indirectly referenced from required .class files

An error occurred at line: 7 in the generated java file
Only a type can be imported. entity.Items resolves to a package

An error occurred at line: 47 in the jsp file: /index.jsp
Items cannot be resolved to a type
44:
45: <%
46: ItemsDAO itemsDao = new ItemsDAO();
47: ArrayList<Items> list = itemsDao.getAllItems();
48: for(int i = 0; i<list.size();i++){
49: %>
50: <center>


An error occurred at line: 56 in the jsp file: /index.jsp
Items cannot be resolved to a type
53: <td>
54: <!-- 鍟嗗搧寰幆寮� -->
55: <%
56: Items item = list.get(i);
57: %>
58: <div>
59: <dl>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.


写回答 关注

1回答

  • qq_迷雾里探路_04322391
    2016-11-15 16:54:32

    复制: 

    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: 

    寻求度娘 ;说的很清楚,祝你能解决问题

    qq_lzY

    一点点往回找,发现是字母打错了= =,所以匹配不到,找不到方法

    2016-11-16 07:21:55

    共 1 条回复 >

JAVA遇见HTML——JSP篇

Java Web入门级教程JSP,带你轻松的学习JSP基础知识

248278 学习 · 3071 问题

查看课程

相似问题