Why was perform() method changed as execute() method in Action class?

Help me

Showing Answers 1 - 9 of 9 Answers

Nikita Dodiya

  • Nov 20th, 2007
 

The new method execte() is necessary because the perform() method declares that it throws only IOException and ServletException. Due to the added declarative exception-hndling functionality, the framework needs to catch all instance of java.lang.Exception from Action class.

Instead of changing the method signature for the perform() method and breaking backward compability, the execute method was added.

hi.. In struts 1.1 perform() method is used in action class..
but In struts 1.2 execute() method is arrive.. so that execute method is used in actio class.. But There is no difference between perform() and execute() method.. both works like same.. Execute the data from the ActionFormBean...

arkhan_mum

  • Feb 19th, 2009
 

The only difference between the two is
execute() throws Expection whereas
perform() throws IOException and ServletException
perform() has now been depricated so one should use execute() only.

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