Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the use of ActionErrors in Struts

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


Please Help Members By Posting Answers For Below Questions

What is validate() and reset() functions?

1043


What is xml based validation in struts2?

1068


What are the benefits of Interceptors in Struts2?

1177


How you will enable front-end validation based on the xml in validation.xml?

1089


What is the purpose of @action annotation?

1026


What do you mean by tiles in struts?

1036


How to handle exceptions in structs?

1130


Why do the struts tags provide for so little formatting?

969


Does apache tomcat use struts?

917


How can we display all validation errors to user on jsp page?

1087


Difference between html tags and struts specific html tags

902


How does struts work?

966


In struts.xml, what does the attribute "method" stands for in the "action" tag?

950


What is the design role played by struts?

1018


What is dispatchaction?

1098