In our web app's struts-config.xml file, there are a bunch of <action>
s defined, and they have both a name
and an attribute
attribute on most of them, with the form name in both. For example:
<action
attribute="LoginForm" <-- this line
name="LoginForm"
path="/welcome"
type="com.foo.presentation.action.LandingActionPre">
<forward name="SUCCESS" path="landing.welcome" />
<forward name="ALREADY_LOGGED_IN" path="/landing.do?m=getLandingPage" redirect="true"/>
</action>
What does the attribute
attribute do? Or is it not used and is present here by mistake?
This app has been around for ~10 years, and has seen over 40 programmers touch the code base during that time. So it's possible that one added it to a few actions and every one else copied and pasted it throughout the rest of the app not knowing any better.