当前位置: 代码迷 >> Java Web开发 >> struts2用fileupload实现文件下传的有关问题
  详细解决方案

struts2用fileupload实现文件下传的有关问题

热度:9816   发布时间:2013-02-25 21:14:43.0
struts2用fileupload实现文件上传的问题!
2010-3-16 19:10:46 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'upload' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-3-16 19:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'upload' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-3-16 19:10:53 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Could not find action or result
There is no Action mapped for action name upload/. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
at com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Thread.java:619)



按上传就出错~~~哪里问题呢???

------解决方案--------------------------------------------------------
struts2配置文件问题!把配置文件贴出来瞧下!
------解决方案--------------------------------------------------------
楼主貌似没有在Struts.XML里面部署upload这个action吧
------解决方案--------------------------------------------------------
警告: No configuration found for the specified action: 'upload' in namespace: ''. Form action defaulting to 'action' attribute's literal value.

Could not find action or result
There is no Action mapped for action name upload/. - [unknown location]


配置错误 没有找到对应的Action.
------解决方案--------------------------------------------------------
警告: No configuration found for the specified action: 'upload' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-3-16 19:10:47 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: No configuration found for the specified action: 'upload' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
2010-3-16 19:10:53 com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
警告: Could not find action or result
There is no Action mapped for action name upload/. - [unknown location]
at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
  相关解决方案