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
Explain about the process of functioning of the struts program?
Why are frameworks used?
Explain about token feature in struts?
What is the actionform?
How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?
What is role of actionservlet?
How an actionform bean is created?
Difference between html tags and struts specific html tags
How the exceptions are handled in struts?
What are the classes used as part of struts framework ?
Explain how can we upload files in struts2 application?
What are the benefits of Struts framework?
Is struts efficient?
What are the ways in which duplicate form submission can occur?
What’s the difference between struts and espresso?