日期:2014-05-20  浏览次数:20939 次

webwork上传文件报错
错误信息
java.lang.ClassNotFoundException: jakarta 
java.lang.ClassNotFoundException: jakarta 
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at com.opensymphony.webwork.util.ClassLoaderUtils.loadClass(ClassLoaderUtils.java:96)
at com.opensymphony.webwork.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:79)
at com.opensymphony.webwork.dispatcher.DispatcherUtils.wrapRequest(DispatcherUtils.java:422)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Unknown Source)
Class: jakarta not found.

webwork.properties:
XML code

webwork.multipart.parser=jakarta 
webwork.multipart.saveDir=d:\\temp
webwork.multipart.maxSize=10000000



xwork.xml:
XML code

<action name="fileUpload"
  class="com.hp.action.HTFileup.FileUploadAction">
  <result name="success">/fileup/</result>
</action>



web.xml:
XML code

<servlet> 
  <servlet-name>webwork</servlet-name>    
  <servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>webwork</servlet-name>
  <url-pattern>*.action</url-pattern>
</servlet-mapping>
<taglib>
  <taglib-uri>webwork</taglib-uri>
  <taglib-location>/WEB-INF/lib/webwork-2.2.5.jar</taglib-location>
</taglib>



大家帮我看看吧...困扰我两天了!还有什么不知道的信息,后面回复问我...谢谢!

------解决方案--------------------
看错误提示呢,说你缺少class文件,估计你缺少什么jar包