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 |
Which design pattern the interceptors in struts2 is based on?
What is used to display the intermediate result in an interceptor?
What are the contents on web.xml in struts application ?
explain method overridding method overloding with examples?
what is the purpose of load_on_startup entry in struts- config.xml?
How client side validation is enabled on a jsp form?
Can we have different controllers in one struts app?
What is Request Dispatcher and what is Request Process?
How is a lookup dispatch action created?
What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?
What is declarative exception handling in struts?
Who wrote struts?