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 conditions for actionform to work correctly?
Why struts 1 classes are not thread safe whereas struts 2 classes are thread safe?
What is the purpose of form-be tag in struct-config.xml?
How is the Struts framworl related to MVC2?
how to implement singletun design patteren in struts?
Which library is provided by struts for form elements like check boxes, text boxes etc?
In which order struts framework searches for a message bundle?
Why it called struts?
How to use dispatchaction?
What is the use of token interceptor in Struts2?
What is struts in java with example?
How to convert struts to spring mvc?