运行JSP+JAVABEAN在tomcat下出现这个问题
谁帮我看看
type Exception reportmessage 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: 25 in the jsp file: /bookstore/catalog.jsp
BookBean cannot be resolved to a type
22:      <%
23:         while(it.hasNext())
24:         {
25:          BookBean book=(BookBean)it.next();
26:          String title=book.getTitle();
27:          float price=book.getPrice();
28:          int bookId=book.getId(); 
An error occurred at line: 25 in the jsp file: /bookstore/catalog.jsp
BookBean cannot be resolved to a type
22:      <%
23:         while(it.hasNext())
24:         {
25:          BookBean book=(BookBean)it.next();
26:          String title=book.getTitle();
27:          float price=book.getPrice();
28:          int bookId=book.getId(); 
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.

解决方案 »

  1.   

    你是不是忘了导入BookBean类了?
    <%@ page import="....BookBean"%>
      

  2.   

    BookBean   cannot   be   resolved   to   a   type 就表示找不到这个包
      

  3.   

    25:                     BookBean   book=(BookBean)it.next(); BookBean不能被解析
      

  4.   

    的确是,包写错了,但又出现了新问题,请各位帮忙看看,解决后加分报答啊HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage 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: 
    Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:299)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.
      

  5.   

    估计是代码哪写错了,导致JSP无法正常编译