TongWeb7.0 JSP在JDK17及以上版本编译出错
问题在TongWeb7.0JDK17的环境下JSP中含有System变量。html headtitlejsp/title/head body %System.currentTimeMillis()/1000% % System.out.println();% /body /html报错如下An error occurred at line: 7 in the jsp file: /test.jsp System cannot be resolved 4: body 5: 6: 7: %System.currentTimeMillis()/1000% 8: 9: % System.out.println();% 10: An error occurred at line: 9 in the jsp file: /test.jsp System.out cannot be resolved to a type 6: 7: %System.currentTimeMillis()/1000% 8: 9: % System.out.println();% 10: 11: /body 12: /html Stacktrace: at com.tongweb.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102) at com.tongweb.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:212) at com.tongweb.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457) at com.tongweb.jasper.compiler.Compiler.compile(Compiler.java:377) at com.tongweb.jasper.compiler.Compiler.compile(Compiler.java:349) at com.tongweb.jasper.compiler.Compiler.compile(Compiler.java:333) at com.tongweb.jasper.JspCompilationContext.compile(JspCompilationContext.java:600) at com.tongweb.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368) at com.tongweb.web.jasper.servlet.ThanosJspServlet.serviceJspFile(ThanosJspServlet.java:273) at com.tongweb.web.jasper.servlet.ThanosJspServlet.service(ThanosJspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at com.tongweb.web.websocket.server.WsFilter.doFilter(WsFilter.java:53) at com.tongweb.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at com.tongweb.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at com.tongweb.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:420)解决办法1. TongWeb7.0对JSP编译器进行了升级需要升级到TongWeb7.0.4.9_M10及以上版本。2. 大版本升级到TongWeb8.0.