What is the use of ActionErrors in Struts



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

Post New Answer

More Struts Interview Questions

What is includeaction?

0 Answers  


Explain about how requests from the client are sent?

0 Answers  


explain the Struts flow?

4 Answers   Wipro,


what is the current salary package in India for a java programmer who has 2 years experience

7 Answers  


What is the difference between a Strut and a Class?

1 Answers  






What is strut action mapping?

0 Answers  


project architechture in java

3 Answers   AC, IBM, INDUS, Satyam,


shall we use any name for deployment descriptor of struts instead of struts-config.xml

3 Answers   Polaris,


What do you mean by a custom tag?

0 Answers  


i have list of values(e.g 100). using logic:iterate, how can i print the multiples of 5th element? how the logic:iterate will understand the multiples of 5.

2 Answers   CTS, TCS,


How many struts config file in a struts application?

0 Answers  


what is the advantages and diadvantages of Struts?

1 Answers  


Categories