Reputation: 3943
I want to change the checkInterval setting in web.xml.
It's commented out in my current web.xml. In what section of web.xml dpo I update in order that its recognised by tomcat ?
So in web.xml I have :
<!-- checkInterval If development is false and checkInterval is -->
<!-- greater than zero, background compilations are -->
<!-- enabled. checkInterval is the time in seconds -->
<!-- between checks to see if a JSP page (and its -->
<!-- dependent files) needs to be recompiled. [0] -->
How do I uncomment the checkInterval parameter so its recognised by tomcat ?
Upvotes: 0
Views: 2950
Reputation: 11
You also have to set the parameter "development" to "true" for this to work. I copied the whole servlet entry from the web.xml here. There might be other tags, but "development" and "checkInterval" are the most important ones for your question. I would also restart tomcat after these entry changes. checkInterval is the time in seconds the webserver takes to check if a jsp page was changed. If it is just you and a few other developers it is perfectly fine to set it to 1 or 2, just play with it.
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>development</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>checkInterval</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
Upvotes: 1
Reputation: 5130
Yes, in an init-param as the other other answer, within the servlet section under the comment is in (as this is what the comment applies to), so:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>checkInterval</param-name>
<param-value>120</param-value>
</init-param>
....
Upvotes: 0
Reputation: 652
Below is an example. Please consider that the default value is 60.
<init-param>
<param-name>checkInterval</param-name>
<param-value>30</param-value>
</init-param>
Upvotes: 1