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 value stack?
Why it called struts?
What are action errors and error?
Explain architecture of struts2?
Explain about struts dispatch action?
What are the contents on web.xml in struts application ?
In which method of action class the business logic is executed?
How we can install struts?
What is actioninvocation in struts2?
Briefly tell the two kinds of form beans.
What’s the difference between validation.xml and validator-rules.xml files in struts validation framework?
What is filter dispatcher in struts?
What are apache struts?
How are interceptors and servlet filters different?
how to develop the submit and search operations in single jsp using struts?