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

What is the difference between plain-validator and field-validator?

526


How action-mapping tag is used for request forwarding in struts configuration file?

589


Are struts thread safe?

561


Explain the life cycle of a request in struct2 application?

496


How to display validation errors on jsp page?

571






What is actionservlet?

564


When it’s useful to use IncludeAction?

556


Where can I get help with struts?

574


What configurations are stored in struts configuration file ?

539


What are the life cycle methods of interceptor?

522


What is the struts in java?

512


Which file is used by controller to get mapping information for request routing?

539


What is the need of struts?

568


Can we have multiple struts config files ?

543


What is difference between lookupdispatchaction and dispatchaction?

633