You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by gb1071nx <gb...@globallyboundless.com> on 2007/12/31 22:46:15 UTC

Confusion between docs and server.xml

Hello,

Just got through reading docs and xml comments and thought I'd point out
something (minor). 

This here: 

http://tomcat.apache.org/tomcat-6.0-doc/jasper-howto.html#Configuration

seems to contain out-of-date information, if one compares it to the
comments in 

$CATALINA_BASE/conf/web.xml
 

I believe the web.xml comments are the "more correct" documentation, but
thought I'd send in the comparison to let someone who actually knows
confirm my ponits (below).



The docs contain the following bullets: 

* checkInterval - If development is false and reloading is true, 
background compiles are enabled. checkInterval is the time in 
seconds between checks to see if a JSP page needs to be 
recompiled. Default 300 seconds. 

* development - Is Jasper used in development mode (will check 
for JSP modification on every access)? true or false, default true. 

* modificationTestInterval - Checks for modification for a given 
JSP file (and all its dependent files) will be performed only once 
every specified amount of seconds. Setting this to 0 will cause the 
JSP to be checked on every access. Default is 4 seconds. 

* reloading - Should Jasper check for modified JSPs? true or false, 
default false. 


But in $CATALINA_BASE/conf/web.xml, I find these (clearer, less
confusing) entries: 

  
  <!--   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 needs
to   -->
  <!--                       be recompiled. [0]
-->
  <!--
-->
  <!--   modificationTestInterval
-->
  <!--                       Causes a JSP (and its dependent files) to
not  -->
  <!--                       be checked for modification during the
-->
  <!--                       specified time interval (in seconds) from
the  -->
  <!--                       last time the JSP was checked for
-->
  <!--                       modification. A value of 0 will cause the
JSP  -->
  <!--                       to be checked on every access.
-->
  <!--                       Used in development mode only. [4]
-->
  <!--
-->
  <!--   development         Is Jasper used in development mode? If
true,   -->
  <!--                       the frequency at which JSPs are checked for
-->
  <!--                       modification may be specified via the
-->
  <!--                       modificationTestInterval parameter. [true]
-->


Suggested changes to the documentation (jasper-howto.html) 

[1] Is 'reloading' a deprecated attribute?  If so, it should be removed
from the docs.

[2] The 'development' attribute should state "every
modificationTestInterval seconds" (or some such description), instead of
"on every access".

[3] The 'modificationTestInterval' attribute should explain it's only
used when development=true (to distinguish it from 'checkInterval')

[4] 'checkInterval' appears to have the wrong default value (is it 300
or 0?)

For both the jasper-howto and the comments:
[5] Is the exclusion of "...(and its dependent files)..." from the
description of checkInterval deliberate?  If the checks are the same
regardless of 'development' setting, then I think it should be described
the same in both 'interval' parameters. Which leads me to...
 
[6] This is totally an internals question, so feel free to flame someone
who doesn't contribute code, but:  couldn't modificationTestInterval and
checkInterval be merged into a single attribute?  I'm genuinely curious
to know why it would be "bad" to do so. 




Thanks, and Happy New Year. 

 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Confusion between docs and server.xml

Posted by Mark Thomas <ma...@apache.org>.
gb1071nx wrote:
> Just got through reading docs and xml comments and thought I'd point out
> something (minor). 
Thanks for the feedback.

> Suggested changes to the documentation (jasper-howto.html) 
> 
> [1] Is 'reloading' a deprecated attribute?  If so, it should be removed
> from the docs.
It has been removed.

> [2] The 'development' attribute should state "every
> modificationTestInterval seconds" (or some such description), instead of
> "on every access".
Fixed.

> [3] The 'modificationTestInterval' attribute should explain it's only
> used when development=true (to distinguish it from 'checkInterval')
Fixed

> [4] 'checkInterval' appears to have the wrong default value (is it 300
> or 0?)
It should be zero (and has been changed).

> For both the jasper-howto and the comments:
> [5] Is the exclusion of "...(and its dependent files)..." from the
> description of checkInterval deliberate?  If the checks are the same
> regardless of 'development' setting, then I think it should be described
> the same in both 'interval' parameters. Which leads me to...
The exclusion isn't deliberate. I have added it to both to make it clear
how it works.

> [6] This is totally an internals question, so feel free to flame someone
> who doesn't contribute code, but:  couldn't modificationTestInterval and
> checkInterval be merged into a single attribute?  I'm genuinely curious
> to know why it would be "bad" to do so.
They could, but keeping them separate allows simpler switching from
development to production where you almost certainly want different values
for these intervals.

I have also:
- arranged the parameters in both locations in alphabetical order
- added the following parameters missing from one or both locations
  - displaySourceFragment
  - dumpSmap
  - engineOptionsClass
  - suppressSmap
  - xpoweredBy
- removed the sendErrorToClient option that had no code to actually it (and
appears to have been this way for years)
- fixed a few typos

Thanks again for the feedback.

Mark

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org