首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

eclipse+struts有关问题,请大侠指点

2013-09-11 
eclipse+struts问题,请大侠指点!eclipse建动态web项目的时候,classes怎么在build文件下啊,我用struts怎么

eclipse+struts问题,请大侠指点!
eclipse建动态web项目的时候,classes怎么在build文件下啊,我用struts怎么老说找不到WEB-INF下的classes啊!
eclipse错误:
严重:   Error   loading   WebappClassLoader
    delegate:   false
    repositories:
        /WEB-INF/classes/
---------->   Parent   Classloader:
org.apache.catalina.loader.StandardClassLoader@1b383e9
  org.apache.struts.action.ActionServlet
java.lang.ClassNotFoundException:   org.apache.struts.action.ActionServlet
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1034)
at   org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at   java.lang.Thread.run(Thread.java:595)
2007-4-28   16:35:21   org.apache.catalina.core.StandardWrapperValve   invoke
严重:   Allocate   exception   for   servlet   action
java.lang.ClassNotFoundException:   org.apache.struts.action.ActionServlet
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at   org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at   org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1034)
at   org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at   org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at   org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at   org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at   java.lang.Thread.run(Thread.java:595)

------解决方案--------------------


工程属性的构建路径改一下就可以了
把Source下的Defalut Output folder改成WEB-INF下的classes目录
方法二
直接改tomcat的conf 的server.xml,把workDir改成build的classes

放在哪个目录下还是看你的使用习惯了

热点排行