org.apache.jasper.JasperException: java.lang.IllegalStateException: No Java compiler available

To compile JSP pages Tomcat needs a compiler. /usr/share/eclipse-ecj/ecj.jar needs to be in the tomcat classpath.

In Gentoo this can be done (for tomcat-8) in /etc/conf.d/tomcat by adding:

TOMCAT_EXTRA_CLASSPATH="/usr/share/tomcat-servlet-api-3.1/lib/servlet-api.jar:/usr/share/tomcat-servlet-api-3.1/lib/jsp-api.jar:/usr/share/tomcat-servlet-api-3.1/lib/el-api.jar:/usr/share/eclipse-ecj/ecj.jar"

This also adds the other needed libraries to the path.