这个问题 是什么原因导致的呢? 大家帮忙看看阿
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 103 in the jsp file: /CityManage.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\fubai\org\apache\jsp\CityManage_jsp.java:89: non-static method getProductStat(java.lang.String,java.lang.String,int,com.cwc.db.PageCtrl) cannot be referenced from a static context
DBRow rows[] = StatMgr.getProductStat(st_t,en_t,ob,pc);
^
1 error
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:127)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
------解决方案--------------------getProductStat()不是StatMgr的static方法
non-static method
------解决方案--------------------CityManage.jsp文件中DBRow rows[] = StatMgr.getProductStat(st_t,en_t,ob,pc);你放在了静态上下文中,但是getProductStat是一个非静态方法
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html