日期:2014-05-20  浏览次数:20898 次

帮忙看下这是什么错误,谢谢
org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP

An   error   occurred   at   line:   15   in   the   jsp   file:   /huang/graph.jsp
Generated   servlet   error:
/usr/local/tomcat/work/Catalina/localhost/_/org/apache/jsp/huang/graph_jsp.java:131:   cannot   find   symbol
symbol     :   variable   chart
location:   class   org.apache.jsp.huang.graph_jsp
String   filename   =   ServletUtilities.saveChartAsJPEG(chart,   500,   300,   null,   session);
                                                                                                      ^


An   error   occurred   at   line:   15   in   the   jsp   file:   /huang/graph.jsp
Generated   servlet   error:
/usr/local/tomcat/work/Catalina/localhost/_/org/apache/jsp/huang/graph_jsp.java:131:   cannot   find   symbol
symbol     :   variable   ServletUtilities
location:   class   org.apache.jsp.huang.graph_jsp
String   filename   =   ServletUtilities.saveChartAsJPEG(chart,   500,   300,   null,   session);
                                    ^
Note:   /usr/local/tomcat/work/Catalina/localhost/_/org/apache/jsp/huang/graph_jsp.java   uses   or   overrides   a   deprecated   API.


An   error   occurred   at   line:   15   in   the   jsp   file:   /huang/graph.jsp
Generated   servlet   error:
Note:   Recompile   with   -Xlint:deprecation   for   details.
2   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编译没有通过
------解决方案--------------------
你的graph.jsp文件里面有个未定义的变量,chart以及ServletUtilities

结贴给分是个好习惯,谢谢。
------解决方案--------------------
定义一个JfreeChart,把ServletUtilities类导进去试试
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html