Eclipse下配置struts很让我痛苦

最近在开始研究j2ee得一些主流框架技术,比如struts。但是在配置环境得时候出现了N多得错误,在eclipse下安装配置tomcat还算比较顺利。
具体步骤就是安装jdk-->安装tomcat然后在下载tomcat得插件解压后放到eclipse下得plungin下面。
但是问题出现在我得eclipse得workplace放在d盘下得,然后在eclipse下新建一个tomcat项目之后,编写一个简单得jsp文件可以运行,但是原来tomcat下得example就不能运行了。在eclipse下启动tomcat得错误提示如下:
2008-12-12 12:17:59 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.6.0_01\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\Java\jdk1.6.0_01\bin
2008-12-12 12:17:59 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2008-12-12 12:17:59 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1484 ms
2008-12-12 12:17:59 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-12-12 12:17:59 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2008-12-12 12:18:00 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class listeners.ContextListener
java.lang.NoClassDefFoundError: listeners/ContextListener (wrong name: examples/WEB-INF/classes/listeners/ContextListener)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
 at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3770)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 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:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:516)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-12-12 12:18:00 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class listeners.SessionListener
java.lang.NoClassDefFoundError: listeners/SessionListener (wrong name: examples/WEB-INF/classes/listeners/SessionListener)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
 at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3770)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 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:117)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:516)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2008-12-12 12:18:00 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
2008-12-12 12:18:00 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2008-12-12 12:18:00 org.apache.catalina.core.StandardContext start
严重: Context [/examples] startup failed due to previous errors
2008-12-12 12:18:00 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2008-12-12 12:18:00 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-12-12 12:18:01 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/32  config=null
2008-12-12 12:18:01 org.apache.catalina.startup.Catalina start
信息: Server startup in 1728 ms
 很奇怪,我吧eclipse得workplace放到tomcat下得webapps下还不能成功。
请求高人指点。。。

你可能感兴趣的:(eclipse,struts,职场,J2EE,休闲)