SECTION: 950-JSP TITLE: JSP QUESTION: How do I control JSP scratch files?
Dynamically compiled JSP files result in java source files being generated to a scratch directory. By default, this is called org/apache/jsp and is within the temporary directory allocated to each web application. See this faq for more info about how temporary directories are allocated.
The location of the scratch directory can be controlled via the scratch init parameter of the JSP Servlet, which is defined in the webdefaults.xml. However, if the scratch dir is set in the webdefault.xml file, it is used for all web applications, which is typically not what is required for JSP compilation. It can also be set in a jetty-web.xml file, but it is probably simpler to use a work temp directory.
If you wish to keep generated JSP source between runs of the web application, then the keepgenerated init parameter can be set on the JSPServlet. This can be done in the webdefault.xml file for all web applications or in a jetty-web.xml file for a particular web application.