Migrating an application based on Jetty 6 to 9.2 (embedded).
I can't figure out how exactly JSPs are compiled at runtime (no pre-compiling). My application runs OK when I use JDK. But it fails to serve JSP when running in JRE, the error I get is:
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:208)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:384)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
Which clearly indicates that Jetty is looking for Java compiler which is obviously not present in JRE. Looking into Jetty 9.2 docs I read that:
By default, the Apache JSP container will look for the Eclipse Java Compiler (jdt).
I have jetty-jsp-jdt-2.3.3.jar in the classpath but for some reason, Jetty seems to ignore it.
So, my question is - how do I setup an embedded Jetty without JSP precompiling and able to run in JRE. This is essentially what my application in Jetty 6 was doing by means of built-in jasper compiler. Is it even possible with Jetty 9.2?