The problem: I have a web application which is served by Jetty webserver v 7.3. I have a JSP page in the application. When I run the Jetty on system which has JDK(has javac) installed everything works fine. I want to port this to a system which has JRE(does not have javac). When I run the Jetty I get an error.
The solution: Pre-compile the JSP into Servlet. Generate application war file which includes this servlet. Let jetty execute the Servlet in place of compiling and executing JSP at runtime.
I tried to pre-compile JSP using JSPC ant target. But it is generating an empty .java file. My target code is as follows.
<jspc srcdir="${web.dir}"
destdir="${build.classes.dir}"
package="x.y.z"
verbose="9"
classpathref="project.class.path">
<include name="**/index.jsp"/>
</jspc>
Kindly suggest me a proper approach. If my approach is correct, kindly point out the mistake that I am making in configuring the ant task.