File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
struts2: setting string value to int field of a bean does not throw any exception
Joined: Mar 18, 2011
Jan 24, 2012 02:31:34
I had a jsp which has a field user age.
age: <s:textfield name="user.age" id="user.age" ></s:textfield>
in action class, i have i create user bean getter and setter.
it works fine if i enter age as integer but if i enter
for age then it does not throw any exception.
where is the problem?
Joined: Nov 17, 2011
Feb 03, 2012 08:02:26
If I understand correctly the problem, use validation.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: struts2: setting string value to int field of a bean does not throw any exception
Error while validating the input
Avoiding Default primitive wrapper value display on JSF page
How OGNL automatically maps to the appropiate Object
Struts2 very simple validation doesn't work
why getters/setters in java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014