When upgrading Tomcat to version 7.0.57 or 8.0.15 and later, users may get the following JSP compilation error if any of JSP pages contain any invalid < %@ import="some_values;" % > directives that end with a semicolon ";".
For example, error page contains the following stack trace:
HTTP Status 500 - Unable to compile class for JSP type Exception report message Unable to compile class for JSP description The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:672) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) javax.servlet.http.HttpServlet.service(HttpServlet.java:727) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) root cause java.lang.IllegalArgumentException: Page directive: invalid value for import org.apache.jasper.compiler.Node$PageDirective.validateImport(Node.java:628) org.apache.jasper.compiler.Node$PageDirective.addImport(Node.java:609) org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:343) ...
This known issue is due to Tomcat 7.0.57+ and 8.0.15+ Jasper changes to ensure semi-colons are not permitted in JSP import page directives to address another bug issue.
See this changelog for Tomcat 7.0.57 (also applied to 8.0.15) Jasper section.