Answer Posted / biru
In Validate method for each validation error we need to
construct an object of ActionMessage class and we need to
add each ActionMessage class object to ActionErrors class
object .
Ex:
public ActionErrors validate(ActionMapping
am,HttpServletRequest)
{
ActionErrors aes=new ActionErrors();
if(uname.length==0)
{ ActionMessage am1=new ActionMessage("uname.wrong")
aes.add("uname",am1);
}
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is the use of jsonvalidation?
What is the default location of result pages and how can we change it?
What is lookupdispatchaction?
What are the components of struts framework?
What is struts2 namespace?
How exceptions are handled in struts application?
What are action errors and error and what are the consequences they impose?
What is apache struts cve 2017 5638?
Is struts mvc framework?
What are the steps required for setting up validator framework in struts?
What does action do in struts?
What are the core classes of the struts framework?
What are result types in struts?
Why do the struts tags provide for so little formatting?
What is the purpose of '@customvalidator'?