struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Struts Wiki] Update of "StrutsUpgradeNotes11to124" by NiallPemberton
Date Fri, 02 May 2008 00:55:33 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Struts Wiki" for change notification.

The following page has been changed by NiallPemberton:

The comment on the change is:
Correct comment about Actions execute/perform methods

  getServletContext().setAttribute(Globals.MODULE_KEY, moduleConfig);}}}
- == Action.perform(...) is changed to Action.execute(...) ==
+ == Change Action.perform(...) to Action.execute(...) ==
- For your action classes that extend org.apache.struts.action.Action, be sure to implement
the ''execute'' method.  Previously the method to implement was ''perform'', and because the
''perform'' method still exists as a do-nothing method your code will compile and deploy fine,
and leave you wondering why it's not working.  
+ In '''''Struts 1.1''''' the {{{execute(...)}}} method was introduced and {{{perform(...)}}}
method deprecated in [
Action]. In Struts 1.1 the deprecated {{{perform(...)}}} method continues to work.
+ In '''''Struts 1.2.x''''' the deprecated {{{perform(...)}}} method was removed from [
Action] and therefore any Action's which still implement {{{perform(...)}}} rather than {{{execute(...)}}}
no longer function and should be changed to implement {{{execute(...)}}}.
  CategoryHomepage StrutsUpgrade

View raw message