You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2022/04/12 09:00:19 UTC

[Bug 66008] New: Jasper Documentation is misleading (if not wrong) about the trimSpaces option

https://bz.apache.org/bugzilla/show_bug.cgi?id=66008

            Bug ID: 66008
           Summary: Jasper Documentation is misleading (if not wrong)
                    about the trimSpaces option
           Product: Tomcat 10
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: seebass@orcasys.ch
  Target Milestone: ------

The documentation "Jasper 2 JSP Engine How To"
(https://tomcat.apache.org/tomcat-10.0-doc/jasper-howto.html) states under
Production Configuration:

trimSpaces - To remove useless bytes from the response, set this to true.

This is misleading and dangerous (if not just plain wrong):

trimSpace=true removes all spaces between jsp-tags and therefore may affect
output.

Example: The following line will print differently with trimSpaces=true than
with trimSpaces=false

<bean:write name="person" property="firstName"/> <bean:write name="person"
property="familyName"/>



The text in the documentation should be changed to: 
trimSpaces - To remove useless bytes from the response, set this to single.


The same applies to Tomcat 9

Previous Tomcat versions don't have the "single" option. For these tomcats,
that misleading line should be removed or at least a warning should be added,
that output may look different if trimSpaces is enabled.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66008] Jasper Documentation is misleading (if not wrong) about the trimSpaces option

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66008

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Mark Thomas <ma...@apache.org> ---
Fixed in:
- 10.1.x for 10.1.0-M15 onwards
- 10.0.x for 10.0.21 onwards
- 9.0.x for 9.0.63 onwards
- 8.5.x for 8.5.79 onwards

For 9.0.x onwards, I changed the recommendation to single or extended.
For 8.5.x, I removed the recommendation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66008] Jasper Documentation is misleading (if not wrong) about the trimSpaces option

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66008

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
This seems like a matter of opinion over the definition of "useless".

The whole point of the option *is* to affect the output.

The documentation could be improved for "Production Configuration" to (a) be
less forceful about using trimSpaces and (b) encourage the user to read the
complete documentation for that configuration item instead of simply
recommending the value of "true".

Patches are always welcome.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66008] Jasper Documentation is misleading (if not wrong) about the trimSpaces option

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66008

--- Comment #2 from Bernhard Seebass <se...@orcasys.ch> ---
(In reply to Christopher Schultz from comment #1)
> This seems like a matter of opinion over the definition of "useless".
> 
> The whole point of the option *is* to affect the output.
> 

Thanks for your reply!

I agree that it is a question about what is "useless". However, it seems
obvious to me, that nobody would call a single space between two words
"useless", which brings me to the conclusion, that the documentation is wrong
about recommending trimSpace=true (instead of trimSpaces=single) to remove
useless spaces.

I also agree, that the option should indeed affect the html-output, however
nobody should be encouraged to use trimSpaces=true for production only, as this
may have the effect, that the productive web page may be broken (due to missing
spaces) while in development everything looked fine.


I'm sorry to say, I have no idea how to submit a patch that might fix the
documentation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 66008] Jasper Documentation is misleading (if not wrong) about the trimSpaces option

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66008

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Jasper                      |Documentation

--- Comment #3 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Bernhard Seebass from comment #2)
> I'm sorry to say, I have no idea how to submit a patch that might fix the
> documentation.

Are you comfortable modifying HTML (and XML)? Making the changes is relatively
easy. Producing a patch file (or PR) requires that you interact with the
revision-control system (git or GitHub) or keep a copy of the original file(s)
around.

If you're willing, I can walk you through that process. (Post to the dev@
mailing list and I'll walk you through it, there, instead of saving the whole
conversation into Bugzilla.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org