tomcat 5.0.28到tomcat5.5.26发生的JSP不能编译问题

numbwood 2008-05-28 01:51:46
各位,问个问题,我应用从tomcat 5.0 -> tomcat 5.5之后,一直报
“org.apache.jasper.JasperException: Unable to compile class for JSP”错误,提示不能编译JSP,将jdk tools.jar包拷贝到tomcat lib下,还是同样问题,郁闷得要命,在tomcat 5.0下一切正常,何故?


错误描述:
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 37 in the generated java file
The return type is incompatible with JspSourceDependent.getDependants()

下面是JSP转servlet 第37行代码
private static java.util.List _jspx_dependants;

public Object getDependants() { //第37行
return _jspx_dependants;
}
...全文
235 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
beijingzw110 2008-07-18
  • 打赏
  • 举报
回复
谢谢楼主和M_song了!!我也是遇到了这个问题照你的说发就解决了!!但是不明白你说的英文是什么意思能告诉我一下是什么意思吗?麻烦了!!很想知道是为什么
numbwood 2008-06-02
  • 打赏
  • 举报
回复
感谢M_song的指导,当我删除掉:jsper-runtime.jar之后,一切正常
numbwood 2008-05-28
  • 打赏
  • 举报
回复
ths ! I do test.
M_song 2008-05-28
  • 打赏
  • 举报
回复
This problem is sometimes caused by an older version of the JspSourceDependent class being in one of your class loaders. In my case, GWT (google widget toolkit) had this class so that it could install a tomcat server, and it was causing this problem. If you are using an IDE, try looking for the class JspSourceDependent and see if it shows up in any of your jars. If it does, either edit the contents of the jar to take it out, or take the jar out of your WEB-INF/lib directory (or manifest files if you are using a classpath ref)

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧