Reputation: 8805
I'm trying to use jetty with a JRE and not a JDK. I figured if I precompile the jsps, and put the resulting classfiles on the classpath, there should be no need for jetty to try and compile the jsp when the browser requests it, yet I get
org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac.
A full JDK (not just JRE) is required
no matter what I do when I request the jsp from the browser.
I have these init params in my webdefault.xml and the built class files are definitely on the classpath
<init-param>
<param-name>reloading</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>classpath</param-name>
<param-value>c:/project/build/classes</param-value>
</init-param>
How do I get jetty to not try and compile the jsp again so I can run it with a jre and not a jdk?
Upvotes: 2
Views: 1160
Reputation: 20061
After wrestling with precompiling JSPs for Jetty running on a JRE I found that precompilation isn't necessary. Jetty (7.5.5 and later) ships with a compiler that can be used to compile JSPs when Jetty is run using a JRE. The details can be found on this page:
https://wiki.eclipse.org/Jetty/Howto/Configure_JSP#Compiling_JSPs
In short, either add the following snippet to jetty.xml
:
<Call class="java.lang.System" name="setProperty">
<Arg>org.apache.jasper.compiler.disablejsr199</Arg>
<Arg>true</Arg>
</Call>
or this line into start.ini
:
-Dorg.apache.jasper.compiler.disablejsr199=true
Upvotes: 2