A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
PostGIS in Action
this week in the
JDBC and Relational Databases
Java Advanced Topics Training
Java in General
Handling int default to zero
Joined: Mar 13, 2011
Nov 20, 2012 04:25:35
I have a
I have a new <html:text> field in a .jsp that maps to a formsbean.
The formsbean has its getters and setters correctly working.
The variable is of type int and it is defaulting to 0 in the .jsp.
What is the best way of ?nulling? this field in the .jsp?
Thanks in advance
Joined: Jul 23, 2008
Nov 20, 2012 22:06:39
Is there any special purpose you want to make the field null..
Struts sets the default value based on datatype ,so if int is there then it sets to 0
.. Please correct me if i am wrong.
I agree. Here's the link:
subject: Handling int default to zero
NumberFormatException in spring
retrieve action field in jsp
default value=0 of int field changing in form struts
field value displayed wrongly
Data Transfer Object
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015