xutils android上传图片,服务器怎么接收处理

langya123 发布于 2013/11/17 22:56
阅读 4K+
收藏 0

请教一下:

xutils在上传图片的时候,java服务器怎么做接收操作啊,用jfinal getfile时报错


java.lang.RuntimeException: java.io.IOException: Corrupt form data: premature ending
at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:121)
at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:59)
at com.jfinal.core.Controller.getFiles(Controller.java:600)
at com.jfinal.core.Controller.getFile(Controller.java:607)
at com.langya.controller.H_Users_Controller.addPics(H_Users_Controller.java:119)
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.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:127)
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:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)


谢谢

加载中
0
wyouflf
wyouflf
xutils QQ群共享里jsp文件上传简单的例子 你可以先用jsp页面测试上传成功再用xutils上传
返回顶部
顶部