aspose file tools
The moose likes Struts and the fly likes Struts2 type conversion error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 type conversion error message" Watch "Struts2 type conversion error message" New topic

Struts2 type conversion error message

Zenikko Sugiarto
Ranch Hand

Joined: Jan 09, 2005
Posts: 58

in Struts2 data types are automatically converted during form submission.

FOr example, in the form I can have a textfield (string) that is mapped to the attribute Age of a person object (integer).

If I input a character STruts2 will detect that this is not a number and return "INPUT". The problem is, I can not display the error message associated with this?

What I want is to be able to display "field <xxx> data type is wrong". It needs to be generic as well, I don't want to define the error message for all the fields I have in my system?

Have you tried LearnNowOnline?
subject: Struts2 type conversion error message