安装TOMCAT后自带的jsp-examples不能运行而servlets-examples可以运行

为当前最终发行版之前的所有版本提供支持
回复
aaronbai
帖子: 163
注册时间: 2006-10-15 10:12
送出感谢: 0
接收感谢: 0

安装TOMCAT后自带的jsp-examples不能运行而servlets-examples可以运行

#1

帖子 aaronbai » 2006-11-19 17:22

安装TOMCAT后自带的jsp-examples不能运行而servlets-examples可以运行!





echo $CLASSPATH
/usr/lib/jvm/java-1.5.0-sun/lib:/usr/share/tomcat5.5/common/lib:.

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/home/aaron/bin:/usr/lib/jvm/java-1.5.0-sun/bin:/usr/share/tomcat5.5/bin:.


是何原因?
Gmail: baifh03@gmail.com
MSN:aaronminwoo@hotmail.com
喜欢LINUX的加我!
一起学习讨论!
aaronbai
帖子: 163
注册时间: 2006-10-15 10:12
送出感谢: 0
接收感谢: 0

#2

帖子 aaronbai » 2006-11-19 17:27

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: org.apache.jasper.tagplugins.jstl.If
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

org.apache.jasper.JasperException: org.apache.jasper.tagplugins.jstl.If
org.apache.jasper.compiler.TagPluginManager.init(TagPluginManager.java:109)
org.apache.jasper.compiler.TagPluginManager.apply(TagPluginManager.java:51)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

java.lang.ClassNotFoundException: org.apache.jasper.tagplugins.jstl.If
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
org.apache.jasper.compiler.TagPluginManager.init(TagPluginManager.java:106)
org.apache.jasper.compiler.TagPluginManager.apply(TagPluginManager.java:51)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
Gmail: baifh03@gmail.com
MSN:aaronminwoo@hotmail.com
喜欢LINUX的加我!
一起学习讨论!
头像
SuperWar3Fan
帖子: 1263
注册时间: 2006-05-20 6:25
来自: 山东淄博
送出感谢: 0
接收感谢: 0
联系:

#3

帖子 SuperWar3Fan » 2006-11-20 8:07

java.lang.ClassNotFoundException: org.apache.jasper.tagplugins.jstl.If
tag文件解析的原因?
还是没有需要的库?
aaronbai
帖子: 163
注册时间: 2006-10-15 10:12
送出感谢: 0
接收感谢: 0

#4

帖子 aaronbai » 2006-11-20 11:16

SuperWar3Fan 写了:
java.lang.ClassNotFoundException: org.apache.jasper.tagplugins.jstl.If
tag文件解析的原因?
还是没有需要的库?


我不知道原因啊,可是自带的SERVLET EXAMPLE可以顺利运行的

奇怪!
Gmail: baifh03@gmail.com
MSN:aaronminwoo@hotmail.com
喜欢LINUX的加我!
一起学习讨论!
jasonzheng72
帖子: 2
注册时间: 2006-12-19 9:48
送出感谢: 0
接收感谢: 0

#5

帖子 jasonzheng72 » 2006-12-27 13:27

在tomcat5.0中if.class的包路径是org.apache.jasper.tagplugins.jstl.If,在5.5中在tomcat5.0中if.class的包路径是org.apache.jasper.tagplugins.jstl.If,在5.5中org.apache.jasper.tagplugins.jstl.core.If,就多了一个“core”。
解决方法是修改目录/usr/share/tomcat5.5/webapps/jsp-examples/WEB-INF/ 下的tagplugins.xml文件,把类似于<plugin-class>org.apache.jasper.tagplugins.jstl.If</plugin-class>替换为<plugin-class>org.apache.jasper.tagplugins.jstl.core.If</plugin-class>
回复

回到 “老旧版本支持”