首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

org.apache.jasper.JasperException: Unable to compile class for JSP:该怎么处理

2013-09-11 
org.apache.jasper.JasperException: Unable to compile class for JSP:org.apache.jasper.JasperExceptio

org.apache.jasper.JasperException: Unable to compile class for JSP:
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 11 in the jsp file: /getMessage.jsp
BeanListHandler cannot be resolved to a type
8: String sql="select * from guestbook order by id desc";
9: md.setDataSourceName("java:/comp/env/jdbc/mysql");
10: md.init();
11: List list =(List) md.Query(sql,null,new BeanListHandler(Guestbook.class));
12:
13: for(int i=0;i<list.size();i++){
14: Guestbook gb = (Guestbook)gb.get(i);


An error occurred at line: 11 in the jsp file: /getMessage.jsp
Guestbook cannot be resolved to a type
8: String sql="select * from guestbook order by id desc";
9: md.setDataSourceName("java:/comp/env/jdbc/mysql");
10: md.init();
11: List list =(List) md.Query(sql,null,new BeanListHandler(Guestbook.class));
12:
13: for(int i=0;i<list.size();i++){
14: Guestbook gb = (Guestbook)gb.get(i);


An error occurred at line: 14 in the jsp file: /getMessage.jsp
Guestbook cannot be resolved to a type
11: List list =(List) md.Query(sql,null,new BeanListHandler(Guestbook.class));
12:
13: for(int i=0;i<list.size();i++){
14: Guestbook gb = (Guestbook)gb.get(i);
15:
16: %>
17: <div align="center">


An error occurred at line: 14 in the jsp file: /getMessage.jsp
Guestbook cannot be resolved to a type
11: List list =(List) md.Query(sql,null,new BeanListHandler(Guestbook.class));
12:
13: for(int i=0;i<list.size();i++){
14: Guestbook gb = (Guestbook)gb.get(i);
15:
16: %>
17: <div align="center">


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:644)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:358)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

在学习struts 刚接触!一直报出这样的错。请在线的前辈们帮帮忙吧!看看我拿错了

[解决办法]
jsp代码贴全下
http://topic.csdn.net/t/20051206/20/4442223.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html

热点排行