You need to use namespace
attribute because your action is mapped with @Namespace
.
<s:form namespace="/admin_side" action="test">
<s:textfield id="name" name="name" label="Enter your name"/>
<s:textfield id="email" name="email" label="Enter your email"/>
<s:submit value="Submit" method="postAction"/>
</s:form>
If this doesn't work in the latest version according to WW-4023 then you can invoke a method directly
<s:url var="myUrl" namespace="/admin_side" action="test" method="postAction"/>
<s:form action="%{#myUrl}">
<s:textfield id="name" name="name" label="Enter your name"/>
<s:textfield id="email" name="email" label="Enter your email"/>
<s:submit value="Submit"/>
</s:form>
or configure params
interceptor parameter excludeParams
to remove method
parameter from excluded parameters.
Note, either you use DMI and the methods above or don't use it, in this case you should map an action to the method and don't use attributes method
or submit
tag's method
and action
as the issue above restrict using special parameters. If you have multiple submit buttons if you follow that restriction you have to dynamically change form
tag's action attribute using JavaScript onclick
event.