求助,DWZ的上传问题,怎么老是报错呀!
org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException: the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is application/x-www-form-urlencoded; charset=UTF-8 at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.(FileUploadBase.java:947) at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334) at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:115) at com.dxcm.controller.ActivesController.edit(ActivesController.java:148) 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:597) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55) at com.dxcm.interceptor.LoginCheckInterceptor.intercept(LoginCheckInterceptor.java:12) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51) at com.dxcm.interceptor.CheckTokenInterceptor.intercept(CheckTokenInterceptor.java:11) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51) at com.dxcm.interceptor.GlobalInterceptor.intercept(GlobalInterceptor.java:21) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51) at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44) at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) 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:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
问题解决了。
因为 Ajax 不支持enctype="multipart/form-data" 所以用隐藏 iframe 来处理无刷新表单提交.
DWZ的前台的form应该写成
<form method="post" action="url" class="pageForm required-validate"
enctype="multipart/form-data" onsubmit="return iframeCallback(this,
[navTabAjaxDone/dialogAjaxDone]);">
是表单提交的呢,还是Ajax提交的呢?Ajax不支持enctype=”multipart/form-data”的
引用来自“zhuxinyu”的评论
系统提示你没写。。。
系统提示你没写。。。