无法针对JSP错误编译类

时间:2018-06-27 11:43:13

标签: javascript java

    <%@page import="java.util.Enumeration"%>
    <%@page import="parts.BooksDTO"%>
    <%@page import="java.util.ArrayList"%>
    <%@page import="parts.BooksDAO"%>
    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" enter code here"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Readers &mdash;</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
    content="Free HTML5 Website Template by FreeHTML5.co" />
<meta name="keywords"
    content="free website templates, free html5, free template, free bootstrap, free website template, html5, css3, mobile first, responsive" />
<meta name="author" content="FreeHTML5.co" />

<meta property="og:title" content="" />
<meta property="og:image" content="" />
<meta property="og:url" content="" />
<meta property="og:site_name" content="" />
<meta property="og:description" content="" />
<meta name="twitter:title" content="" />
<meta name="twitter:image" content="" />
<meta name="twitter:url" content="" />
<meta name="twitter:card" content="" />


<!-- Animate.css -->
<link type="text/css" rel="stylesheet" href="css/animate.css">
<!-- Icomoon Icon Fonts-->
<link type="text/css" rel="stylesheet" href="css/icomoon.css">
<!-- Bootstrap  -->
<link type="text/css" rel="stylesheet" href="css/bootstrap.css">
<!-- Theme style  -->
<link type="text/css" rel="stylesheet" href="css/style.css">

<!-- Modernizr JS -->
<script src="js/modernizr-2.6.2.min.js"></script>
<!-- FOR IE9 below -->

</head>
<body>
    <%
        BooksDAO dao = new BooksDAO();
        ArrayList<BooksDTO> list = new ArrayList<>();
        BooksDTO dto = null;
        list = dao.selectAll();
        String link = null;
        dao.updateRating();
        Enumeration<String> seen = session.getAttributeNames();
    %>

    <div class="fh5co-loader"></div>

    <div id="page">
        <nav class="fh5co-nav" role="navigation">
        <div class="container">
            <div class="fh5co-top-logo">
                <ul>
                    <li class="has-dropdown"><a href="#">Genre</a>
                        <ul class="dropdown">
                            <li>
                                <form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="art"> <input
                                        type="submit" value="Art">
                                </form>
                            </li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="biography"> <input
                                        type="submit" value="Biography">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="classics"> <input
                                        type="submit" value="Classics">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="comics"> <input
                                        type="submit" value="Comics">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="fiction"> <input
                                        type="submit" value="Fiction">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="history"> <input
                                        type="submit" value="History">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="horror"> <input
                                        type="submit" value="Horror">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="fantasy"> <input
                                        type="submit" value="Fantasy">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="science"> <input
                                        type="submit" value="Science">
                                </form></li>
                            <li><form action="styledSortedMain.jsp">
                                    <input type="hidden" name="sort" value="sci-fiction"> <input
                                        type="submit" value="Science Fiction">
                                </form></li>
                        </ul></li>
                </ul>

            </div>
            <div class="fh5co-top-menu menu-1 text-center">
                <form action="searchEngine.jsp" id="search">
                    Search : <input type="text" name="search"> <input
                        type="submit" name="Search">
                </form>

            </div>



            <div class="fh5co-top-social menu-1 text-right">
                <form action="logInBridge.jsp" id="login">
                    ID<input type="text" name="id"> PW<input type="text"
                        name="pw"> <input type="submit" value="Log in">
                </form>

            <a href="styledSignUp.jsp">Sign up</a>


            </div>

        </div>
        </nav>

        <div id="fh5co-work">
            <div class="container">
                <div class="row top-line animate-box"></div>
                <%
                    for (int i = 0; i < list.size(); i++) {
                        dto = list.get(i);
                %>

                <div class="col-md-4 text-center animate-box">
                    <form action="bookSession.jsp" class="work">
                        <input type="hidden" name="selected" value="<%=dto.getTitle()%>">

                        <div class="work-grid"
                            style="background-image: url(img/joker.jpg);">
                            <div class="inner">
                                <div class="desc">
                                    <input type="submit" value="     <%=dto.getTitle()%>"> <br>
                                    <span class="cat"><%=dto.getRating()%></span>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <%
                    }
                %>
            </div>
        </div>
    </div>


    <div class="gototop js-top">
        <a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
    </div>

    <!-- jQuery -->
    <script src="js/jquery.min.js"></script>
    <!-- jQuery Easing -->
    <script src="js/jquery.easing.1.3.js"></script>
    <!-- Bootstrap -->
    <script src="js/bootstrap.min.js"></script>
    <!-- Waypoints -->
    <script src="js/jquery.waypoints.min.js"></script>
    <!-- Main -->
    <script src="js/main.js"></script>

    </body>
    </html>

到目前为止,我已经从事了一个网页制作项目。 到现在为止,该文件已被很好地编译。 我没有碰到这一个代码, 我编辑了与该jsp文件没有直接关系的一两个类。 突然我遇到了org.apache.jasper.JasperException:无法为JSP编译类:错误 我检查了import指令,在eclipse oxygen中将Java 1.8与tomcat v8.5一起使用 我真的不明白这是怎么发生的

由注释部分中的请求编辑: 以下是完整的堆栈跟踪- org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:212)     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:495)     org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)     org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)     org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:595)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)     javax.servlet.http.HttpServlet.service(HttpServlet.java:742)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

0 个答案:

没有答案