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

Showing Answers 1 - 7 of 7 Answers

RajaShunmugam

  • May 10th, 2006
 

 Perform()is Depricated in Struts 1.1.

  Was this answer useful?  Yes

jai.java

  • May 17th, 2006
 

the execute() method will return ActionForward where as the perform() method will return Message or ActionErrors,.

  Was this answer useful?  Yes

Mohan

  • Jul 7th, 2006
 

Both are same but execute() throws the exception and its returns the actionForward

  Was this answer useful?  Yes

Radha krishna

  • Jul 17th, 2006
 

hi,

this is radha krishna, this is regarding your question about difference between perform() method in struts1.0 and exceute() method in struts 1.1 version.

The actual difference is,just see the prototype

public ActionForward perform(ActionMapping mapping,
                             ActionForm form,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.io.IOException,
                             javax.servlet.ServletException

and

public ActionForward exceute(ActionMapping mapping,
                             ActionForm form,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)

                             throws Exception

so in case of perform() method u can't throw exceptions other than IOException,ServletException.

In case of excute() method, u can throw any exception,because its prototype is 'throws Exception.'
   

  Was this answer useful?  Yes

jojiprakash

  • Jul 18th, 2006
 

both perform() and execute() are similar.where as execute() has two formats.where as perform() is deprecated now

  Was this answer useful?  Yes

srinivas

  • Sep 26th, 2006
 

  Hi,

   am srinivas, perform method is returns ActionForward(), not Message or ActionErrors

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions