首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

JSP调试遇到有关问题,求救!

2013-09-11 
JSP调试遇到问题,求救!!我的网上购书系统做的差不多了,但是在编译时遇到了问题好象读javabean文件BookInf.

JSP调试遇到问题,求救!!
我的网上购书系统做的差不多了,但是在编译时遇到了问题好象读javabean文件BookInf.class时有错误,难道是BookInf.class编译后有错误,还是放的文件路径有问题,我的bean文件放在ROOT/bookshop/WEB-INF/classes/bean/BookInf.class,运行index.jsp出现下面的提示:

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

Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:7:   package   bean   does   not   exist
import   bean.BookInf;
                        ^


An   error   occurred   at   line:   67   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:130:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index);
                                                                ^


An   error   occurred   at   line:   67   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:130:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index);
                                                                                              ^


An   error   occurred   at   line:   87   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:172:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+1);
                                                                ^


An   error   occurred   at   line:   87   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:172:   cannot   resolve   symbol


symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+1);
                                                                                              ^


An   error   occurred   at   line:   116   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:223:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+2);
                                                                ^


An   error   occurred   at   line:   116   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:223:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+2);
                                                                                              ^


An   error   occurred   at   line:   135   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:264:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+3);
                                                                ^


An   error   occurred   at   line:   135   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:264:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+3);
                                                                                              ^




An   error   occurred   at   line:   164   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:315:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+4);
                                                                ^


An   error   occurred   at   line:   164   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:315:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+4);
                                                                                              ^


An   error   occurred   at   line:   185   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:358:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+5);
                                                                ^


An   error   occurred   at   line:   185   in   the   jsp   file:   /bookshop/index.jsp
Generated   servlet   error:
C:\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\bookshop\index_jsp.java:358:   cannot   resolve   symbol
symbol     :   class   BookInf  
location:   class   org.apache.jsp.bookshop.index_jsp
    BookInf   book=   (BookInf)booklist.elementAt(index+5);
                                                                                              ^
13   errors


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)


org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


[解决办法]
看看是不是你页面上的引用的包路径没有写正确
[解决办法]
路径有错。我有日子没用JSP了啊。不过我记得import.后面应该是bean的路径啊,默认是在web/inf下的,但是你存放的是WEB-INF/classes/bean/BookInf.class,
却写的是,import bean.bookinf,应该是import classes.bean.bookinf

[解决办法]
加入tools.jar试试

我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html

热点排行