and beans such as this would work fine, except for a subtle point: because we’ve listed two different beans, but the same class, we’d actually get two instances of the LoginAction created. Since typically we want only a single instance of our actions, this could cause unexpected and difficult to diagnose problems later.

In order to only create a single instance of the LoginAction class, you can use an alias in Spring. I’ve started creating a single bean for each action, the aliasing the Struts actions to that single instance, like this: