You can use the parameter property for this.
<!-- Article Edit action mapping -->
<action
path="/article/Edit"
type="org.apache.struts.artimus.http.Client"
name="articleForm"
scope="request"
validate="false"
parameter="select">
<forward
name="continue"
path="/WEB-INF/pages/Entry.jsp"/>
</action>
<!-- Article Store action mapping -->
<action
path="/article/Save"
type="org.apache.struts.artimus.http.Client"
name="articleForm"
scope="request"
validate="true"
input="/WEB-INF/pages/Entry.jsp"
parameter="store">
<forward
name="continue"
path="/WEB-INF/pages/Article.jsp"/>
</action>
Then in the Action:
String dispatch = mapping.getParameter();
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/
David Corbin wrote:
>
> Is there anyway to specify a value in the struts-config.xml that gets pass
> to the action? I have one action that I'd like to reuse, with a ever so
> slightly different behavior.
>
> I know I could do this by have a base action class, and a handful of derived
> classes, but if the ONLY difference can be defined by a string constant, I'd
> rather define it in struts-config.xml
>
> Thanks.
> David Corbin