What is the use of ActionErrors in Struts
Answer / 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 |
What are the struts2 error message keys that can come during file uploading process?
When should we use SwtichAction?
How struts 2 validation works?
What is the purpose of @urlvalidator annotation?
What is the difference between session scope and request scope when saving formbean ?
How to get data from the velocity page in a action class?
Where can i get jar file for use the struts-tags in struts2?
what is request processor class ?
If the framework doesn’t do what I want, can I request that a feature be added?
What is the different actions available in struts?
What is the purpose of form-be tag in struct-config.xml?
how to create a search field in struts.with code