On one of my pages I have two forms and each for has <s:actionerror /> tag. The problem is if the action class returns an error, the error message is displayed on both actionerror tags. How can I set it so only the form being used outputs the error?
Action errors are per-action, not per-form: as such there's only one collection of error messages--there's no way to differentiate them.
There are a few options. One would be to use pseudo-field errors, using a field name that doesn't actually exist in either form, and use the <s:fielderror...> tag, looking for the pseudo-field error. Another would be to just handle it manually.