Tutorials > Program model


Next >


Tutorial: Extending a Struts action

Attention: This tutorial is currently under revision. The content might contain errors or inaccuracies. Subscribe to this page to be notified when an updated version is available.

This tutorial demonstrates how to extend Struts actions in the context of WebSphere Commerce store development. Specifically, we will create a new action class, MyNewAction, that extends the WebSphere Commerce BaseAction class... when a customer first arrives at a store page from one of a predefined set of referring Web sites (for instance, business partners or partner search engines), MyNewAction will create a cookie to store the referring Web site's URL; this information can later be used to pay royalties to the referring Web site if the customer makes a purchase within a predetermined period of time or simply to gather statistics. You will then configure an existing starter store action to use MyNewAction as its implementation class.


Learning objectives


Time required

Expect this tutorial to take about 1 hour to complete.


Audience

This tutorial is intended for WebSphere Commerce Store developers.


Prerequisites

Before beginning this tutorial ensure that you have:

  1. An understanding of the Java programming language

  2. An understanding of Struts

  3. Familiarity with Java servlet programming

Ensure you enable Struts Development in WebSphere Commerce Developer, if it is currently disabled:

  1. Select Window > Preferences.

  2. Select General > Capabilities.

  3. Click Advanced... and select Web Developer (advanced) > Struts Development, if it is currently disabled.

  4. Click OK to accept the changes and close the Advanced Capabilities Settings window.

  5. Click OK to accept the changes and close the Preferences window.


Lessons in this tutorial

Next >


+

Search Tips   |   Advanced Search