This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Struts and the fly likes struts and validator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts and validator" Watch "struts and validator" New topic

struts and validator

karl koch
Ranch Hand

Joined: May 25, 2001
Posts: 388
hi struts gurus

i had a look at struts and validator.
if i get the ActionErrors object then how can i find out what input element of the form created the ActionError ? (i want to mark the input element that had wrong input instead of just listing the error(s) above the form).
Rick Hightower
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
<html:messages id="error" property="nameOfField"/>
The above will only get the messages for the field called nameOfField instead of all of the errors.

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
It is sorta covered in the JavaRanch Style Guide.
subject: struts and validator