...
The plugin containes a modified version of Jasper 5, which reads JSPs from the classpath, and generates the java code in memory (no .java file is written). The Java Compiler API is then used to compile the java source code into a bytecode (in memory, no .class file is generated), and it is turned into a Servlet, which is cached for future use.
About includes
Because the JSP files are read from the classpath, "includes" work differently than they do from the file system. Assume you want to render include "Hello.jsp", when searching for that file in the classpath, multiple files might be found ( on different jars), like somejar.jar!/Hello.jsp
and otherjar.jar!/Hello.jsp
. That's why relative paths do not work in this plugin. Instead, create directory structures for the JSPs. For example, given 2 jsps under org/myexample/jsps
in a jar file:
...