开发者社区> 问答> 正文

Jfinal上传失败?报错

@Jfinal,为什么第一次上传可以成功,但第二次第三次就上传却成功不了,一直报错。form 有设置enctype="multipart/form-data" 的


2013-05-20 19:46:49

[ERROR]-[Thread: http-bio-8080-exec-6]-[com.jfinal.core.ActionHandler.handle()]: /upload/
java.lang.RuntimeException: java.io.IOException: Posted content type isn't multipart/form-data
at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:121)
at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:69)
at com.jfinal.core.Controller.getFiles(Controller.java:626)
at com.jfinal.core.Controller.getFile(Controller.java:633)
at com.easej.test.controller.TestController.upload(TestController.java:24)
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 com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Posted content type isn't multipart/form-data
at com.oreilly.servlet.multipart.MultipartParser.<init>(MultipartParser.java:168)
at com.oreilly.servlet.MultipartRequest.<init>(MultipartRequest.java:223)
at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:105)
... 27 more

展开
收起
爱吃鱼的程序员 2020-06-22 19:20:31 452 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    <divclass="ref">

    引用来自“JFinal”的答案

    <divclass=ref_body><divclass="ref">

    引用来自“Mrzeng”的答案

    <divclass=ref_body><divclass="ref">

    引用来自“JFinal”的答案

    <divclass=ref_body>是否用的tomcat?小心tomcat将请求做了302重定向method注意设置成POST<divclass="ref">

    引用来自“JFinal”的答案

    <divclass="ref_body">method注意设置成POST是否用的tomcat?小心tomcat将请求做了302重定向<divclass="ref">

    引用来自“JFinal”的答案

    <divclass=ref_body>是否用的tomcat?小心tomcat将请求做了302重定向<divclass="ref">

    引用来自“Mrzeng”的答案

    <divclass=ref_body><divclass="ref">

    引用来自“JFinal”的答案

    <divclass=ref_body>是否用的tomcat?小心tomcat将请求做了302重定向<divclass="ref">

    引用来自“Mrzeng”的答案

    <divclass="ref_body"><divclass="ref">

    引用来自“JFinal”的答案

    <divclass="ref_body"><divclass="ref">

    引用来自“Mrzeng”的答案

    <divclass="ref_body"><divclass="ref">

    引用来自“JFinal”的答案

    <divclass="ref_body">是否用的tomcat?小心tomcat将请求做了302重定向

    2020-06-22 19:20:49
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载