I was following a tutorial on Struts2 upon looking at its config file I saw this
<package name="events" namespace="/events" extends="struts-default">
<action name="*" class="actions.events.{1}">
<result>/views/events/{1}.jsp</result>
<result name="redirect" type="redirect">${redirectUrl}</result>
</action>
</package>
Everything here is no rocket science, but what boggles my mind is this class="actions.events.{1} what does the {1} mean or do? what it is purpose?
The above is a wildcard mapping. {1} is a placeholder that will be replaced with the matched action name. So, if you have two actions Action1 and Action2, the above is similar to
More info in the documentation.