nutz 接收上传文件夹可以么?如可以接口 怎么做?
21 回复
{"detailMessage":"Unknow Content-Type : text/plain;charset=UTF-8","stackTrace":[{"declaringClass":"sun.reflect.NativeConstructorAccessorImpl","methodName":"newInstance0","fileName":"NativeConstructorAccessorImpl.java","lineNumber":-2}, {"declaringClass":"sun.reflect.NativeConstructorAccessorImpl","methodName":"newInstance","fileName":"NativeConstructorAccessorImpl.java","lineNumber":57}, {"declaringClass":"sun.reflect.DelegatingConstructorAccessorImpl","methodName":"newInstance","fileName":"DelegatingConstructorAccessorImpl.java","lineNumber":45}, {"declaringClass":"java.lang.reflect.Constructor","methodName":"newInstance","fileName":"Constructor.java","lineNumber":525}, {"declaringClass":"org.nutz.lang.born.ConstructorBorning","methodName":"born","fileName":"ConstructorBorning.java","lineNumber":16}, {"declaringClass":"org.nutz.lang.born.BornContext","methodName":"doBorn","fileName":"BornContext.java","lineNumber":60}, {"declaringClass":"org.nutz.lang.Mirror","methodName":"born","fileName":"Mirror.java","lineNumber":927}, {"declaringClass":"org.nutz.lang.Lang","methodName":"makeThrow","fileName":"Lang.java","lineNumber":113}, {"declaringClass":"org.nutz.mvc.upload.UploadAdaptor","methodName":"getReferObject","fileName":"UploadAdaptor.java","lineNumber":178}, {"declaringClass":"org.nutz.mvc.upload.UploadAdaptor","methodName":"getReferObject","fileName":"UploadAdaptor.java","lineNumber":1}, {"declaringClass":"org.nutz.mvc.adaptor.AbstractAdaptor","methodName":"adapt","fileName":"AbstractAdaptor.java","lineNumber":197}, {"declaringClass":"org.nutz.mvc.impl.processor.AdaptorProcessor","methodName":"process","fileName":"AdaptorProcessor.java","lineNumber":28}, {"declaringClass":"org.nutz.mvc.impl.processor.AbstractProcessor","methodName":"doNext","fileName":"AbstractProcessor.java","lineNumber":44}, {"declaringClass":"org.nutz.mvc.impl.processor.ActionFiltersProcessor","methodName":"process","fileName":"ActionFiltersProcessor.java","lineNumber":40}, {"declaringClass":"org.nutz.mvc.impl.processor.AbstractProcessor","methodName":"doNext","fileName":"AbstractProcessor.java","lineNumber":44}, {"declaringClass":"org.nutz.mvc.impl.processor.ModuleProcessor","methodName":"process","fileName":"ModuleProcessor.java","lineNumber":99}, {"declaringClass":"org.nutz.mvc.impl.processor.AbstractProcessor","methodName":"doNext","fileName":"AbstractProcessor.java","lineNumber":44}, {"declaringClass":"org.nutz.mvc.impl.processor.EncodingProcessor","methodName":"process","fileName":"EncodingProcessor.java","lineNumber":27}, {"declaringClass":"org.nutz.mvc.impl.processor.AbstractProcessor","methodName":"doNext","fileName":"AbstractProcessor.java","lineNumber":44}, {"declaringClass":"org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor","methodName":"process","fileName":"UpdateRequestAttributesProcessor.java","lineNumber":15}, {"declaringClass":"org.nutz.mvc.impl.NutActionChain","methodName":"doChain","fileName":"NutActionChain.java","lineNumber":40}, {"declaringClass":"org.nutz.mvc.impl.ActionInvoker","methodName":"invoke","fileName":"ActionInvoker.java","lineNumber":64}, {"declaringClass":"org.nutz.mvc.ActionHandler","methodName":"handle","fileName":"ActionHandler.java","lineNumber":31}, {"declaringClass":"org.nutz.mvc.NutFilter","methodName":"doFilter","fileName":"NutFilter.java","lineNumber":94}, {"declaringClass":"org.apache.catalina.core.ApplicationFilterChain","methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":241}, {"declaringClass":"org.apache.catalina.core.ApplicationFilterChain","methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":208}, {"declaringClass":"com.ruyima.eop.controller.business.WebCrossOriginFilter","methodName":"doFilter","fileName":"WebCrossOriginFilter.java","lineNumber":86}, {"declaringClass":"org.apache.catalina.core.ApplicationFilterChain","methodName":"internalDoFilter","fileName":"ApplicationFilterChain.java","lineNumber":241}, {"declaringClass":"org.apache.catalina.core.ApplicationFilterChain","methodName":"doFilter","fileName":"ApplicationFilterChain.java","lineNumber":208}, {"declaringClass":"org.apache.catalina.core.StandardWrapperValve","methodName":"invoke","fileName":"StandardWrapperValve.java","lineNumber":219}, {"declaringClass":"org.apache.catalina.core.StandardContextValve","methodName":"invoke","fileName":"StandardContextValve.java","lineNumber":110}, {"declaringClass":"org.apache.catalina.authenticator.AuthenticatorBase","methodName":"invoke","fileName":"AuthenticatorBase.java","lineNumber":506}, {"declaringClass":"org.apache.catalina.core.StandardHostValve","methodName":"invoke","fileName":"StandardHostValve.java","lineNumber":169}, {"declaringClass":"org.apache.catalina.valves.ErrorReportValve","methodName":"invoke","fileName":"ErrorReportValve.java","lineNumber":103}, {"declaringClass":"org.apache.catalina.valves.AccessLogValve","methodName":"invoke","fileName":"AccessLogValve.java","lineNumber":962}, {"declaringClass":"org.apache.catalina.core.StandardEngineValve","methodName":"invoke","fileName":"StandardEngineValve.java","lineNumber":116}, {"declaringClass":"org.apache.catalina.connector.CoyoteAdapter","methodName":"service","fileName":"CoyoteAdapter.java","lineNumber":445}, {"declaringClass":"org.apache.coyote.http11.AbstractHttp11Processor","methodName":"process","fileName":"AbstractHttp11Processor.java","lineNumber":1115}, {"declaringClass":"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler","methodName":"process","fileName":"AbstractProtocol.java","lineNumber":637}, {"declaringClass":"org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor","methodName":"run","fileName":"JIoEndpoint.java","lineNumber":316}, {"declaringClass":"java.util.concurrent.ThreadPoolExecutor","methodName":"runWorker","fileName":"ThreadPoolExecutor.java","lineNumber":1110}, {"declaringClass":"java.util.concurrent.ThreadPoolExecutor$Worker","methodName":"run","fileName":"ThreadPoolExecutor.java","lineNumber":603}, {"declaringClass":"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable","methodName":"run","fileName":"TaskThread.java","lineNumber":61}, {"declaringClass":"java.lang.Thread","methodName":"run","fileName":"Thread.java","lineNumber":722}],"suppressedExceptions":[]}
@At
@Ok("json")
@AdaptBy(type = UploadAdaptor.class, args = { "ioc:myUpload" })
public Object addconfigure(@Param("cabinetid") Integer cabinetid,
HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
return 1;
}
@wendal 用时间帮看看问题出在哪?
@At
@Ok("json")
@AdaptBy(type = UploadAdaptor.class, args = { "ioc:myUpload" })
public Object addconfigure(@Param("cabinetid") Integer cabinetid,
@Param("pic") List tf,
HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
return 1;
}
@At
@Ok("json")
@AdaptBy(type = UploadAdaptor.class, args = { "ioc:myUpload" })
public Object addconfigure(@Param("cabinetid") Integer cabinetid,
@Param("pic") List tf,
HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
return 1;
}
@At
@Ok("json")
@AdaptBy(type = UploadAdaptor.class, args = { "ioc:myUpload" })
public Object addconfigure(@Param("cabinetid") Integer cabinetid,
@Param("pic") List<TempFile> tf,
HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
return 1;
}
我用火狐Restclient 测试,
http://wei.xboxes.cn/eop/celltest/addconfigure/
正文:
cabinetid=1&pic=121212
添加回复
请先登陆