I'm using Spring 3.1.0 JARs for my application. I have mapped my bean class with view through command name, I have no problem with mapping it works clearly.
The issue is that I'm having an int
variable in my bean class:
private int id;
When I map this variable with <'form:input path="id" />'
, it gives the default value 0
in the text box which I don't want there. How can I get rid of this?
I assume you are referring to a form model with 'id' as the private
attribute to the model. Have you tried using an Integer
instead of an int
. An Integer is the class version of the primitive type int
and this may solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With