求大佬帮忙解决HTTP Status 500 - Unable to compile class for JSP:
柠檬茶好喝 2018-06-06 10:10:08 HTTP Status 500 - Unable to compile class for JSP:
type Exception report
message Unable to compile class for JSP:
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: [15] in the generated java file: [C:\Program Files\Apache Software Foundation\Tomcat 8.0\work\Catalina\localhost\Chapter\org\apache\jsp\Chapterlist_jsp.java]
Only a type can be imported. com.zsn.dao.ChapterDao resolves to a package
An error occurred at line: [16] in the generated java file: [C:\Program Files\Apache Software Foundation\Tomcat 8.0\work\Catalina\localhost\Chapter\org\apache\jsp\Chapterlist_jsp.java]
Only a type can be imported. com.zsn.dao.impl.ChapterDaoImpl resolves to a package
An error occurred at line: [17] in the generated java file: [C:\Program Files\Apache Software Foundation\Tomcat 8.0\work\Catalina\localhost\Chapter\org\apache\jsp\Chapterlist_jsp.java]
Only a type can be imported. com.zsn.model1.Chapter resolves to a package
An error occurred at line: 30 in the jsp file: /Chapterlist.jsp
ChapterDao cannot be resolved to a type
27: </head>
28:
29: <%
30: ChapterDao dao = new ChapterDaoImpl();
31: List<Chapter> chapter = dao.findAll();
32: %>
33:
An error occurred at line: 30 in the jsp file: /Chapterlist.jsp
ChapterDaoImpl cannot be resolved to a type
27: </head>
28:
29: <%
30: ChapterDao dao = new ChapterDaoImpl();
31: List<Chapter> chapter = dao.findAll();
32: %>
33:
An error occurred at line: 31 in the jsp file: /Chapterlist.jsp
Chapter cannot be resolved to a type
28:
29: <%
30: ChapterDao dao = new ChapterDaoImpl();
31: List<Chapter> chapter = dao.findAll();
32: %>
33:
34: <body>
An error occurred at line: 44 in the jsp file: /Chapterlist.jsp
Chapter cannot be resolved to a type
41: </tr>
42: <%
43: for(int i=0;i<chapter.size();i++){
44: Chapter c = chapter.get(i);
45: %>
46: <tr>
47: <td><%=c.getId() %></td>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.41 logs.