JSP网站从Tomcat7升级到Tomcat9抛出错误Unable to compile class for JSP] with root cause
程序员文章站
2022-07-08 15:45:53
...
一个历史遗留的JSP网站,部署在Tomcat7上,一切正常
现在升级到Tomcat9,提示错误:
严重: Servlet.service() for servlet [action] in context with path [/XXX] threw exception [org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause
java.lang.IllegalArgumentException: 网页指令:无效引用
...
反正是一番Debug吧,发现问题出在:
<%@ page import="java.util.List;"%>
这一句上,修改为
<%@ page import="java.util.List"%>
一切正常了
现在升级到Tomcat9,提示错误:
严重: Servlet.service() for servlet [action] in context with path [/XXX] threw exception [org.apache.jasper.JasperException: Unable to compile class for JSP] with root cause
java.lang.IllegalArgumentException: 网页指令:无效引用
...
反正是一番Debug吧,发现问题出在:
<%@ page import="java.util.List;"%>
这一句上,修改为
<%@ page import="java.util.List"%>
一切正常了