然后 当表单提交时报错
没有一点头绪呢 你们能帮帮我吗
/** * Created by Corbie on 2016/4/1. */ public class FileUpload extends Controller{ public void getFileupload(){ try { String mHttpUrl = PathKit.getWebRootPath() + "\upload\img\"; int maxSize = 10 * 1024 * 1024; //10M UploadFile upFile = getFile("file", mHttpUrl, maxSize, "utf-8"); System.out.println(upFile.getFileName()); }catch (Exception e){ e.printStackTrace(); } } public void select(){ render("/yqj/testFileupload.html"); } }
>>06:10:10:错找不到指定模板或者加载错(TEMPLATE_LOAD_ERROR): 位于0行 资源:/Fileupload/getFileupload.html 模板根目录为 C:tomcatwebappsbaobiao_uibWEB-INFuijava.lang.RuntimeException: Directory C:tomcatwebappsbaobiao_uibuploadC:tomcatwebappsbaobiao_uibuploadimg not exists and can not create directory. at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:95) at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:53) at com.jfinal.core.Controller.getFiles(Controller.java:734) at com.jfinal.core.Controller.getFile(Controller.java:739) at com.bvtc.controller.FileUpload.getFileupload(FileUpload.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.jfinal.aop.Invocation.invoke(Invocation.java:73) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74) at com.bvtc.handler.GlobalHandler.handle(GlobalHandler.java:37) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2503) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2492) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
>>06:10:10:错找不到指定模板或者加载错(TEMPLATE_LOAD_ERROR): 位于0行 资源:/Fileupload/getFileupload.html 模板根目录为 C:tomcatwebappsbaobiao_uibWEB-INFui
java.lang.RuntimeException: Directory C:tomcatwebappsbaobiao_uibuploadC:tomcatwebappsbaobiao_uibuploadimg not exists and can not create directory.
at com.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:95)
at com.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:53)
at com.jfinal.core.Controller.getFiles(Controller.java:734)
at com.jfinal.core.Controller.getFile(Controller.java:739)
at com.bvtc.controller.FileUpload.getFileupload(FileUpload.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.jfinal.aop.Invocation.invoke(Invocation.java:73)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
at com.bvtc.handler.GlobalHandler.handle(GlobalHandler.java:37)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2503)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2492)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)