日期:2014-05-18  浏览次数:20788 次

帮看个启动tomcat时的错误。
错误如下,我是在eclipse里面启动tomcat的,在eclipse里面运行不了工程,
把工程copy到tomcat目录webapps下,手动启动tomcat也是报这个警告,但可以正常运行jsp。

严重:   Error   deploying   configuration   descriptor   ROOT.xml
java.lang.NoClassDefFoundError:   javax/servlet/http/HttpServlet
at   java.lang.ClassLoader.defineClass1(Native   Method)
at   java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at   java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at   org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847)
at   org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873)
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326)
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at   org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at   org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
at   org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
at   org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at   org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at   org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at   org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at   org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at   org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at   org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at   org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at   org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at   org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at   org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at   org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at   org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at   org.apache.catalina.core.StandardService.start(StandardService.java:448)
at   org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at   org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native   Method)
at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at   java.lang.reflect.Method.invoke(Method.java:585)
at   org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at   org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

我在\apache-tomcat-5.5.23\conf\Catalina\localhost下找到root.xml了,
内容如下:
<!--   NitroX:   Remove   this   comment   if   you   want   to   keep   the   file   -->
<Context   debug= "0 "   docBase= "/i:/workspace/Web20070419/web/ "   path= " "   reloadable= "true "   workDir= "D:\tools1\apache-tomc