How to solve org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler
How to resolve org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler. When I open this localhost: 8080 / manager / html it works, but clicks on / manager or host-manager or JSP examples, I get this error.
org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause
java.lang.IllegalStateException: No Java compiler available
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext.java:228)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:638)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334
source to share
Invalid file: jasper.jar You can find a complete list of jars in tomcat lib in RELEASE_NOTES: http://tomcat.apache.org/tomcat-7.0-doc/RELEASE-NOTES.txt under Related APIs
source to share
You are missing some jasper libraries in your Tomcat lib folder. See here http://affy.blogspot.de/2006/10/fixing-no-java-compiler-available.html
I currently have this problem with an old 5.5 installation. The file I was missing is jasper-compiler-jdt.jar.
HTH, Alex
source to share
Watch for java / tomcat versions!
The java version of my target server was 1.7, so I added a line to the pom.xml:
<java.version>1.7</java.version>
It worked well with tomcat 1.7 server configured in eclipse. Then I went to the embedded tomcat server for spring boot and got the same error. By default, spring is running tomcat 8.xx version. After realizing what I added:
<tomcat.version>7.0.63</tomcat.version>
in the pom.xml and the error went away. (I think only the main tomcat version is important.)
source to share