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 kind of mvc is struts 2?

779


What is the difference between filters and interceptors ?

741


How to build struts application in eclipse?

749


What is the purpose of action-mappings tag in struct-config.xml?

780


What are construction struts?

698


How many struts config file in a struts application?

708


What are action errors and error and what are the consequences they impose?

787


What is the purpose of constant tag in struts.xml?

721


What types of validations are available in xml based validation in struts2?

798


What is ognl?

820


Explain about the future of struts?

725


How to use forward action to restrict a strut application to mvc?

807


What is http redirect?

793


What is apache struts used for?

704


What does params interceptor?

716