Search code examples
jsptomcattomcat8

What is the difference between checkInterval and modificationTestInterval?


What is the difference between checkInterval and modificationTestInterval?

checkInterval checks if the JSP page needs to be recompiled. Likewise, modifyTestInterval checks to see if it changes periodically.

The only other thing is whether development is true or false?


Solution

  • Both options work only in development mode (cf. Tomcat documentation):

    • checkInterval decides how often to run background compilations, i.e. how often to recompile all known *.jsp files. This happens whether you access the page or not and the results are in the logs, so you don't have to refresh your browser page. If you access a JSP page from your browser a compilation attempt will always be run,
    • modificationTestInterval decides how many seconds must pass between two compilations of the same file. If you compulsively save the file to disk, this configuration prevents the compiler to compile the JSP page every checkInterval. It also protects you from a broken system clock.