Tomcat 对web.xml进行更改
我想更改web.xml中的checkInterval设置 它在我当前的web.xml中被注释掉了。我更新web.xml dpo的哪个部分以使其被tomcat识别 因此,在web.xml中,我有:Tomcat 对web.xml进行更改,tomcat,tomcat6,Tomcat,Tomcat6,我想更改web.xml中的checkInterval设置 它在我当前的web.xml中被注释掉了。我更新web.xml dpo的哪个部分以使其被tomcat识别 因此,在web.xml中,我有: <!-- checkInterval If development is false and checkInterval is --> <!-- greater than zero, background compil
<!-- 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] -->
如何取消checkInterval参数的注释,以便tomcat能够识别它?下面是一个示例。请考虑默认值为60。< /P>
<init-param>
<param-name>checkInterval</param-name>
<param-value>30</param-value>
</init-param>
检查间隔
30
是,在init参数中作为另一个答案,在servlet部分中,注释位于(因为这是注释所适用的),因此:
jsp
org.apache.jasper.servlet.JspServlet
检查间隔
120
....
您还必须将参数“development”设置为“true”才能工作。我在这里从web.xml复制了整个servlet条目。可能还有其他标签,但“开发”和“检查间隔”是您的问题最重要的标签。在这些条目更改之后,我还会重新启动tomcat。
checkInterval是Web服务器检查jsp页面是否更改所用的时间(以秒为单位)。如果只有你和其他几个开发人员,将其设置为1或2是完全可以的,只需使用它即可
<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>
jsp
org.apache.jasper.servlet.JspServlet
发展
真的
检查间隔
2.
3.
您能不能取消注释?@Woody请查看编辑问题
<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>