Tutorials > Program model > Extend a Struts action

< Previous | Next >


Configure TopCategoriesDisplay to use MyNewAction

By default, all WebSphere Commerce actions use com.ibm.commerce.struts.BaseAction as their implementation class. In this step, we will configure the TopCategoriesDisplay action, responsible for invoking the main page of the consumer direct sample store, to use the extension, com.ibm.commerce.sample.struts.MyNewAction, instead. These changes affect all stores that use the TopCategoriesDisplay action.


Procedure

  1. In the Enterprise Explorer view, navigate to Stores > WebContent > WEB-INF.

  2. Right-click the struts-config-ext.xml file; then click Open With > Struts Configuration File Editor.

  3. In the Action Mappings tab, replace the current values...

    1. In the Actions Mappings section, locate the /TopCategoriesDisplay entry and highlight it.

    2. In the Action Mapping attributes section, in the Type field, click Browse and select the MyNewAction class from the com.ibm.commerce.sample.struts package.

  4. Save the changes.

< Previous | Next >


+

Search Tips   |   Advanced Search