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 two different types of validations that the validator framework supports?
Are struts and shocks the same?
What is the default suffix for Struts2 action URI and how can we change it?
Explain the components of struts?
If the framework doesn’t do what I want, can I request that a feature be added?
What is the purpose of global-forwards tag in struct-config.xml?
What is ValueStack and OGNL?
Explain about the validation steps which have to be carried during validation of client-side address?
What is struts 2 framework in java?
What is the purpose of '@keyproperty'?
What are the Core classes of Struts Framework?
Please can you tell me ,where can we used the MVC other than web applications.