千然 2019-02-19 14:56 采纳率: 0%
浏览 1058

用Kindeidtor 上传图片时候报错(upload_json.jsp)求指点

图片说明
二月 19, 2019 2:21:13 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/testKindEditor1] threw exception [Unable to compile class for JSP:

An error occurred at line: [21] in the generated java file: [D:\workAndStudy\apache-tomcat-7.0.85\work\Catalina\localhost\testKindEditor1\org\apache\jsp\kindeditor\jsp\upload_005fjson_jsp.java]
Only a type can be imported. org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper resolves to a package

An error occurred at line: 128 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
125: %>
126: <%!
127: private String getError(String message) {
128: JSONObject obj = new JSONObject();
129: obj.put("error", 1);
130: obj.put("message", message);
131: return obj.toJSONString();

An error occurred at line: 128 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
125: %>
126: <%!
127: private String getError(String message) {
128: JSONObject obj = new JSONObject();
129: obj.put("error", 1);
130: obj.put("message", message);
131: return obj.toJSONString();

An error occurred at line: 30 in the jsp file: /kindeditor/jsp/upload_json.jsp
ServletFileUpload cannot be resolved
27:

28: response.setContentType("text/html; charset=UTF-8");
29:

30: if(!ServletFileUpload.isMultipartContent(request)){
31: out.println(getError("璇烽?夋嫨鏂囦欢銆?"));
32: return;
33: }

An error occurred at line: 80 in the jsp file: /kindeditor/jsp/upload_json.jsp
MultiPartRequestWrapper cannot be resolved to a type
77: }
78:

79:
80: MultiPartRequestWrapper wrapper = (MultiPartRequestWrapper) request;
81: //鑾峰緱涓婁紶鐨勬枃浠跺悕
82: String fileName = wrapper.getFileNames("imgFile")[0];//imgFile,imgFile,imgFile
83: //鑾峰緱鏂囦欢杩囨护鍣?

An error occurred at line: 80 in the jsp file: /kindeditor/jsp/upload_json.jsp
MultiPartRequestWrapper cannot be resolved to a type
77: }
78:

79:
80: MultiPartRequestWrapper wrapper = (MultiPartRequestWrapper) request;
81: //鑾峰緱涓婁紶鐨勬枃浠跺悕
82: String fileName = wrapper.getFileNames("imgFile")[0];//imgFile,imgFile,imgFile
83: //鑾峰緱鏂囦欢杩囨护鍣?

An error occurred at line: 120 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
117: fos.close();
118: }
119: //鍙戦?佺粰 KE

120: JSONObject obj = new JSONObject();
121: obj.put("error", 0);
122: obj.put("url", saveUrl +"/" + newImgName);
123: ///zswz/attached/image/20111129/ image 20111129195421_593.jpg

An error occurred at line: 120 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
117: fos.close();
118: }
119: //鍙戦?佺粰 KE

120: JSONObject obj = new JSONObject();
121: obj.put("error", 0);
122: obj.put("url", saveUrl +"/" + newImgName);
123: ///zswz/attached/image/20111129/ image 20111129195421_593.jpg

Stacktrace:] with root cause
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [21] in the generated java file: [D:\workAndStudy\apache-tomcat-7.0.85\work\Catalina\localhost\testKindEditor1\org\apache\jsp\kindeditor\jsp\upload_005fjson_jsp.java]
Only a type can be imported. org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper resolves to a package

An error occurred at line: 128 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
125: %>
126: <%!
127: private String getError(String message) {
128: JSONObject obj = new JSONObject();
129: obj.put("error", 1);
130: obj.put("message", message);
131: return obj.toJSONString();

An error occurred at line: 128 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
125: %>
126: <%!
127: private String getError(String message) {
128: JSONObject obj = new JSONObject();
129: obj.put("error", 1);
130: obj.put("message", message);
131: return obj.toJSONString();

An error occurred at line: 30 in the jsp file: /kindeditor/jsp/upload_json.jsp
ServletFileUpload cannot be resolved
27:

28: response.setContentType("text/html; charset=UTF-8");
29:

30: if(!ServletFileUpload.isMultipartContent(request)){
31: out.println(getError("璇烽?夋嫨鏂囦欢銆?"));
32: return;
33: }

An error occurred at line: 80 in the jsp file: /kindeditor/jsp/upload_json.jsp
MultiPartRequestWrapper cannot be resolved to a type
77: }
78:

79:
80: MultiPartRequestWrapper wrapper = (MultiPartRequestWrapper) request;
81: //鑾峰緱涓婁紶鐨勬枃浠跺悕
82: String fileName = wrapper.getFileNames("imgFile")[0];//imgFile,imgFile,imgFile
83: //鑾峰緱鏂囦欢杩囨护鍣?

An error occurred at line: 80 in the jsp file: /kindeditor/jsp/upload_json.jsp
MultiPartRequestWrapper cannot be resolved to a type
77: }
78:

79:
80: MultiPartRequestWrapper wrapper = (MultiPartRequestWrapper) request;
81: //鑾峰緱涓婁紶鐨勬枃浠跺悕
82: String fileName = wrapper.getFileNames("imgFile")[0];//imgFile,imgFile,imgFile
83: //鑾峰緱鏂囦欢杩囨护鍣?

An error occurred at line: 120 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
117: fos.close();
118: }
119: //鍙戦?佺粰 KE

120: JSONObject obj = new JSONObject();
121: obj.put("error", 0);
122: obj.put("url", saveUrl +"/" + newImgName);
123: ///zswz/attached/image/20111129/ image 20111129195421_593.jpg

An error occurred at line: 120 in the jsp file: /kindeditor/jsp/upload_json.jsp
JSONObject cannot be resolved to a type
117: fos.close();
118: }
119: //鍙戦?佺粰 KE

120: JSONObject obj = new JSONObject();
121: obj.put("error", 0);
122: obj.put("url", saveUrl +"/" + newImgName);
123: ///zswz/attached/image/20111129/ image 20111129195421_593.jpg

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:498)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:660)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)

  • 写回答

1条回答 默认 最新

  • OneLeafLucky 2019-02-26 15:49
    关注

    把kinderditor文件夹下的jsp文件夹下的lib文件夹下的三个jar包,复制到tomcat的lib文件夹下

    评论

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler