>>06:10:10:错找不到指定模板或者加载错(TEMPLATE_LOAD_ERROR):位于0行资源:/Fileupload/getFileupload.html模板根目录为C:\tomcat\webapps\baobiao_uib\WEB-INF\ui
java.lang.RuntimeException:DirectoryC:\tomcat\webapps\baobiao_uib\upload\C:\tomcat\webapps\baobiao_uib\upload\img\notexistsandcannotcreatedirectory.
atcom.jfinal.upload.MultipartRequest.wrapMultipartRequest(MultipartRequest.java:95)
atcom.jfinal.upload.MultipartRequest.<init>(MultipartRequest.java:53)
atcom.jfinal.core.Controller.getFiles(Controller.java:734)
atcom.jfinal.core.Controller.getFile(Controller.java:739)
atcom.bvtc.controller.FileUpload.getFileupload(FileUpload.java:17)
atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
atjava.lang.reflect.Method.invoke(Method.java:497)
atcom.jfinal.aop.Invocation.invoke(Invocation.java:73)
atcom.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
atcom.bvtc.handler.GlobalHandler.handle(GlobalHandler.java:37)
atcom.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217)
atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
atorg.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2503)
atorg.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2492)
atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
atorg.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
atjava.lang.Thread.run(Thread.java:745)
<spanstyle="color:#808080;font-style:italic;">/**<spanstyle="color:#808080;font-style:italic;">CreatedbyCorbieon2016/4/1.<spanstyle="color:#808080;font-style:italic;">/<spanstyle="color:#000080;font-weight:bold;">publicclassFileUpload<spanstyle="color:#000080;font-weight:bold;">extendsController{<spanstyle="color:#000080;font-weight:bold;">publicvoidgetFileupload(){<spanstyle="color:#000080;font-weight:bold;">try{StringmHttpUrl=PathKit.<spanstyle="font-style:italic;">getWebRootPath()+<spanstyle="color:#008000;font-weight:bold;">"<spanstyle="color:#000080;font-weight:bold;">\<spanstyle="color:#008000;font-weight:bold;">upload<spanstyle="color:#000080;font-weight:bold;">\<spanstyle="color:#008000;font-weight:bold;">img<spanstyle="color:#000080;font-weight:bold;">\<spanstyle="color:#008000;font-weight:bold;">";<spanstyle="color:#000080;font-weight:bold;">intmaxSize=<spanstyle="color:#0000ff;">10<spanstyle="color:#0000ff;">1024<spanstyle="color:#0000ff;">1024;<spanstyle="color:#808080;font-style:italic;">//10M<spanstyle="color:#808080;font-style:italic;">UploadFileupFile=getFile(<spanstyle="color:#008000;font-weight:bold;">"file",mHttpUrl,maxSize,<spanstyle="color:#008000;font-weight:bold;">"utf-8");System.<spanstyle="color:#660e7a;font-weight:bold;font-style:italic;">out.println(upFile.getFileName());}<spanstyle="color:#000080;font-weight:bold;">catch(Exceptione){e.printStackTrace();}}<spanstyle="color:#000080;font-weight:bold;">publicvoidselect(){render(<spanstyle="color:#008000;font-weight:bold;">"/yqj/testFileupload.html");}}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。