You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/04/07 02:38:46 UTC

DO NOT REPLY [Bug 18746] New: - bean:message trim the keys before using them

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18746>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18746

bean:message trim the keys before using them

           Summary: bean:message trim the keys before using them
           Product: Struts
           Version: Nightly Build
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: dan@mojavelinux.com


This is a simple change, but one that will save developers a lot of headaches. 
Sometimes, when contructing an xml attribute, whitespace might show up at the
beginning or the end of the value.  In this case, no key will be found and
Struts will throw an error.  The problem is, whitespace is hard to see in log
files and thus would go undetected.  The following demonstrates code that would
generate an error

<bean:message key="
app.title"/>

Clearly the whitespace will never be desired and can safely and easily be
trimmed.  This becomes even more critical when text editors mangle the jsp code.
 Since html is whitespace independent, so should the key.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org