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
How many action classes can be used in struts application?
Describe the mvc on struts?
Explain architecture of struts2?
What are the reasons for an error message not being displayed while developing struts application?
What are best practices to follow while developing Struts2 application?
Explain about how requests from the client are sent?
How client side validation is enabled on a jsp form?
What is the difference between struts and spring?
What is http forward?
What is the differences between struts1 and struts2?
What is the difference between empty default namespace and root namespace?
What is the purpose of struts.xml in struct2?
Explain about the
What are the core classes of struts framework? Explain
What are action errors and error?