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 you will display validation fail errors on jsp page?

534


What are construction struts?

503


Explain about struts relation to html tags?

541


what is meant by Struts Validator Framework?

559


What is s token?

528






Can you explain the directory structure for a struts folder in brief ?

517


How is the action mapping specified?

539


What is execute method in struts?

491


How the flow of various requests happens in struts application?

527


Can you explain value stack?

533


What is interceptor in Struts2?

560


What is the difference between empty default namespace and root namespace?

546


Why aren’t the struts tags maintained as part of the jakarta taglibs project ?

540


How to override the default error message that can come during file uploading process?

565


Why was reload removed from struts (since 1.1)?

539