You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sr...@chennai.tcs.co.in on 2003/11/20 16:02:30 UTC

Validation of Primitive Data Types

Hello All,

I am trying to use STRUTS Validator for validating some attributes of
primitive data type like double, int etc. However this fails as those
attributes are defaulted to their corresponding default values for the
datatypes like 0.0 for double and 0 for int.

I guess we can get around it by defining init params (for ActionServlet) in
web.xml for "convertNull" with a value of "true".

I just wanted to know if anyone could achieve this successfully.

Thanks & Regards
Sreekant G