why certain fields of form int or float datatype have there default value set as 0 every time i access the jsp page. Can we change this .i.e. i want nothing in place of default 0 appearing in int datatype form field.
Thanks in advance
with regards<br />Datta.<br /> <br />To the world you might be one person, but to one person you just might be the world !
Even for numeric fields, it's best to define them as Strings in your ActionForm bean. One of the reasons for doing this is the problem you mention: the fact that they show as "0" rather than blank on the form. Another reason is validation. If the user enters a non-numeric value, Struts will throw a NumberFormatException when it tries to populate the form.
It's fine to represent the value as numeric in your model classes, but validate it first and then convert it to numeric.