What is difference between perform() used in struts1.0 and
execute() used in 1.1 ?

Answer Posted / srilakshmi

Using perform() u have throw IOException,ServletException.
But where as execute() method throws Generic Exception.
i.e
public ActionForward perform(ActionMapping am,ActionForm
af,HttpServletRequest req,HttpServeltResponse res) throws
ServletException,IOException{...some stuff...}



public ActionForward execute(ActionMapping am,ActionForm
af,HttpServletRequest req,HttpServeltResponse res) throws

Exception{...some stuff...}

So no need to handle all the exceptions caught programatically.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does struts2 token work?

719


Explain how can we upload files in struts2 application?

819


Why do we need mapdispatchtoprops?

657


Explain about logic match tag?

790


Mark the differences between html tags and strut specific html tags.

768


What does action do in struts?

735


What is action class? What are the types of action class?

724


What is execute method in struts?

686


Which technologies can be used at view layer in struts?

864


Describe the basic steps used to create a tiles application?

788


Which library is provided by struts for form elements like check boxes, text boxes etc?

705


What is purpose of execandwait interceptor?

788


What is the purpose of @before annotation?

775


What does apache struts do?

691


Can I have html form property without associated getter and setter formbean methods?

794