求大佬帮忙解决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.
...全文
694 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
卖水果的net 2018-06-07
  • 打赏
  • 举报
回复
500 是内部错误,可以到 java 区问问。
吉普赛的歌 2018-06-07
  • 打赏
  • 举报
回复
ChapterDao cannot be resolved to a type https://blog.csdn.net/zcl_love_wx/article/details/52066388

22,209

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧