当前位置:Gxlcms > PHP教程 > javascript-关于kindeditor富文本中图片上传问题

javascript-关于kindeditor富文本中图片上传问题

时间:2021-07-01 10:21:17 帮助过:7人阅读

我点个上传就会报错,不知道是不是那里的设置有问题,有懂这个大神说下是那里问题

  1. <code>
  2. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  3. JSONObject cannot be resolved to a type
  4. 114: %>
  5. 115: <%!
  6. 116: private String getError(String message) {
  7. 117: JSONObject obj = new JSONObject();
  8. 118: obj.put("error", 1);
  9. 119: obj.put("message", message);
  10. 120: return obj.toJSONString();
  11. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  12. JSONObject cannot be resolved to a type
  13. 114: %>
  14. 115: <%!
  15. 116: private String getError(String message) {
  16. 117: JSONObject obj = new JSONObject();
  17. 118: obj.put("error", 1);
  18. 119: obj.put("message", message);
  19. 120: return obj.toJSONString();
  20. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  21. JSONObject cannot be resolved to a type
  22. 105: return;
  23. 106: }
  24. 107:
  25. 108: JSONObject obj = new JSONObject();
  26. 109: obj.put("error", 0);
  27. 110: obj.put("url", saveUrl + newFileName);
  28. 111: out.println(obj.toJSONString());
  29. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  30. JSONObject cannot be resolved to a type
  31. 105: return;
  32. 106: }
  33. 107:
  34. 108: JSONObject obj = new JSONObject();
  35. 109: obj.put("error", 0);
  36. 110: obj.put("url", saveUrl + newFileName);
  37. 111: out.println(obj.toJSONString());
  38. Stacktrace:] with root cause
  39. org.apache.jasper.JasperException: Unable to compile class for JSP:
  40. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  41. JSONObject cannot be resolved to a type
  42. 114: %>
  43. 115: <%!
  44. 116: private String getError(String message) {
  45. 117: JSONObject obj = new JSONObject();
  46. 118: obj.put("error", 1);
  47. 119: obj.put("message", message);
  48. 120: return obj.toJSONString();
  49. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  50. JSONObject cannot be resolved to a type
  51. 114: %>
  52. 115: <%!
  53. 116: private String getError(String message) {
  54. 117: JSONObject obj = new JSONObject();
  55. 118: obj.put("error", 1);
  56. 119: obj.put("message", message);
  57. 120: return obj.toJSONString();
  58. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  59. JSONObject cannot be resolved to a type
  60. 105: return;
  61. 106: }
  62. 107:
  63. 108: JSONObject obj = new JSONObject();
  64. 109: obj.put("error", 0);
  65. 110: obj.put("url", saveUrl + newFileName);
  66. 111: out.println(obj.toJSONString());
  67. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  68. JSONObject cannot be resolved to a type
  69. 105: return;
  70. 106: }
  71. 107:
  72. 108: JSONObject obj = new JSONObject();
  73. 109: obj.put("error", 0);
  74. 110: obj.put("url", saveUrl + newFileName);
  75. 111: out.println(obj.toJSONString());
  76. Stacktrace:
  77. at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
  78. at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
  79. at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:485)
  80. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
  81. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
  82. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
  83. at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
  84. at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
  85. at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
  86. at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
  87. at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
  88. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  89. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  90. at cn.qtone.xxt.base.utiltity.UrlFilter.doFilter(UrlFilter.java:114)
  91. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  92. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  93. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  94. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  95. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
  96. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
  97. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  98. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  99. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
  100. at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
  101. at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
  102. at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
  103. at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  104. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  105. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  106. at java.lang.Thread.run(Thread.java:662)</code>

回复内容:

我点个上传就会报错,不知道是不是那里的设置有问题,有懂这个大神说下是那里问题

  1. <code>
  2. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  3. JSONObject cannot be resolved to a type
  4. 114: %>
  5. 115: <%!
  6. 116: private String getError(String message) {
  7. 117: JSONObject obj = new JSONObject();
  8. 118: obj.put("error", 1);
  9. 119: obj.put("message", message);
  10. 120: return obj.toJSONString();
  11. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  12. JSONObject cannot be resolved to a type
  13. 114: %>
  14. 115: <%!
  15. 116: private String getError(String message) {
  16. 117: JSONObject obj = new JSONObject();
  17. 118: obj.put("error", 1);
  18. 119: obj.put("message", message);
  19. 120: return obj.toJSONString();
  20. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  21. JSONObject cannot be resolved to a type
  22. 105: return;
  23. 106: }
  24. 107:
  25. 108: JSONObject obj = new JSONObject();
  26. 109: obj.put("error", 0);
  27. 110: obj.put("url", saveUrl + newFileName);
  28. 111: out.println(obj.toJSONString());
  29. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  30. JSONObject cannot be resolved to a type
  31. 105: return;
  32. 106: }
  33. 107:
  34. 108: JSONObject obj = new JSONObject();
  35. 109: obj.put("error", 0);
  36. 110: obj.put("url", saveUrl + newFileName);
  37. 111: out.println(obj.toJSONString());
  38. Stacktrace:] with root cause
  39. org.apache.jasper.JasperException: Unable to compile class for JSP:
  40. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  41. JSONObject cannot be resolved to a type
  42. 114: %>
  43. 115: <%!
  44. 116: private String getError(String message) {
  45. 117: JSONObject obj = new JSONObject();
  46. 118: obj.put("error", 1);
  47. 119: obj.put("message", message);
  48. 120: return obj.toJSONString();
  49. An error occurred at line: 117 in the jsp file: /editor/jsp/upload_json.jsp
  50. JSONObject cannot be resolved to a type
  51. 114: %>
  52. 115: <%!
  53. 116: private String getError(String message) {
  54. 117: JSONObject obj = new JSONObject();
  55. 118: obj.put("error", 1);
  56. 119: obj.put("message", message);
  57. 120: return obj.toJSONString();
  58. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  59. JSONObject cannot be resolved to a type
  60. 105: return;
  61. 106: }
  62. 107:
  63. 108: JSONObject obj = new JSONObject();
  64. 109: obj.put("error", 0);
  65. 110: obj.put("url", saveUrl + newFileName);
  66. 111: out.println(obj.toJSONString());
  67. An error occurred at line: 108 in the jsp file: /editor/jsp/upload_json.jsp
  68. JSONObject cannot be resolved to a type
  69. 105: return;
  70. 106: }
  71. 107:
  72. 108: JSONObject obj = new JSONObject();
  73. 109: obj.put("error", 0);
  74. 110: obj.put("url", saveUrl + newFileName);
  75. 111: out.println(obj.toJSONString());
  76. Stacktrace:
  77. at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103)
  78. at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366)
  79. at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:485)
  80. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:379)
  81. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
  82. at org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
  83. at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
  84. at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
  85. at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
  86. at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
  87. at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
  88. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
  89. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  90. at cn.qtone.xxt.base.utiltity.UrlFilter.doFilter(UrlFilter.java:114)
  91. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
  92. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
  93. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
  94. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
  95. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
  96. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
  97. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  98. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
  99. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
  100. at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
  101. at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
  102. at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
  103. at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  104. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  105. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  106. at java.lang.Thread.run(Thread.java:662)</code>

人气教程排行