-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Chris,

On 6/1/17 10:51 AM, Chris Cheshire wrote:
> 7.0.77 (latest version in EPEL repository)
> 
> On Thu, Jun 1, 2017 at 10:27 AM, Christopher Schultz < 
> ch...@christopherschultz.net> wrote:
> 
> Chris,
> 
> On 5/31/17 6:31 PM, Chris Cheshire wrote:
>>>> I am using tomcat 7 on CentOS 7 and I need to pass a null
>>>> value to tag attributes of type Long/Integer/Float, however
>>>> it is *always* coerced to zero.
>>>> 
>>>> <%@attribute name="parentId" required="true"
>>>> rtexprvalue="true" type="java.lang.Long" %>
>>>> 
>>>> Changing required to false does nothing. I tried setting the 
>>>> system property org.apache.el.parser.COERCE_TO_ZERO to false
>>>> in tomcat.conf (-Dorg.apache.el.parser.COERCE_TO_ZERO=false
>>>> with my other JAVA_OPTS) but this does nothing. The value
>>>> before it hits the tag is null and inside the tag is 0. If I
>>>> query the System properties it shows it as set to false, but
>>>> Tomcat is not honoring it and is still coercing nulls to
>>>> zero. I understand the spec says to do this etc but that
>>>> defeats the purpose of using an object vs atomic type in the
>>>> first place and is horribly shortsighted.
>>>> 
>>>> Upgrading to Tomcat 8 is not a solution unfortunately as
>>>> there is no RPM for it.
>>>> 
>>>> How do I pass a null Long/Float/Integer as a tag attribute
>>>> and have it kept as null and not turned into an incorrect
>>>> value?
> 
> What exact version of Tomcat 7 are you running?

Can you produce a SSCCE[1] for this? If so, and you can reproduce it
in a clean Tomcat 7.0.78 from apache.org, please file a bug[2] and
attach your test case.

- -chris

[1] http://sscce.org/
[2] https://bz.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%207
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZMDnEAAoJEBzwKT+lPKRY0fcP/ixfCdOkWtPpb/xMUWreadoS
39Zuzii0nwsp4hsH2MkK1mZcdPGe5YElZTF1xMDtYEccUaAdDdy5DLFOnSCiXHse
2gv7nuH9cc4BQgNE6EAYTdEm/uosLwRkTn5cajNhuPdFUoTYKXwB4OGUWSMDKPUk
8nB/A7/36V2qDuu7lneR/ip/VTXLBcEA1mC+InCF7iL4VVXxl6jikc6whDcOn1m+
F5oEWzSjGn3Xu0yni5Qd8Az7GISRP7DLKHNSNoEvLgEHqdZD85R3bNY977iOujfq
3dCaDkjG/gCYdpJY+8ylRf045ZsqOn/Np8ba3WApGllXUzmbed1K+hKkKC/19D74
bGnJNRAtlpraWioWaqCb0eQn3Aml5prYD+3WKWu7bfSweLTzi1uwMV+7QL+z0rDb
9ZOmvtgW+LFlECSV71zFRTaswy1GUjR/ODTLfmLOU3PLYR+md8wgezCZW/z0C1Lt
o3Xm5RaOYc8ar6j4nwBa5LN8V4oSAWtCfzT4xZw+rDFNSbi5LSJYWoae4uuZ0jqY
fcINvOyowB4bxFNEycDi2qWjmShkRPpCljTsmDFSHUJ0yiNbSeEfHShSK/fvDEa7
AuZhS389LE2UcC/2/+0BTmoZqgMPqW1Bta413R6theLJ81sJe88MlmKb8T+JixyY
PpsbS7nvFIjDmJ3pNKcK
=67eb
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to