Hi.
The form validation error messages are missing after I upgraded from
2.0.11 to 2.1.6, and I can't figure out why. When I submit an invalid
form, the form just comes back without the visible error messages.
The form:
@Validation
public class MySupportForm {
private String supportCategory;
@RequiredStringValidator(message = "Please select a category")
@StringLengthFieldValidator(message = "Please select a category",
trim = true, minLength = "1")
public final String getSupportCategory() {
return supportCategory;
}
...
}
struts.xml:
...
<action name="ShowMySupport" class="my.app.MySupport">
<result>/my/my_support.jsp</result>
<result name="input">/my/my_support.jsp</result>
<interceptor-ref name="defaultInsecureStack"/>
</action>
<action name="MySupport" class="my.app.MySupport" method="doSend">
<result name="input" type="chain">ShowMySupport</result>
<result name="success" type="redirectAction">MyComplete</result>
<interceptor-ref name="defaultInsecureStack"/>
</action>
<action name="MyComplete" class="my.app.MySupport">
<result>/my/my_support_success.jsp</result>
<interceptor-ref name="defaultInsecureStack"/>
</action>
...
The jsp:
...
<s:form action="MySupport" cssClass="settings">
<table>
<s:textfield label="Category " name="form.supportCategory" />
...
<input type="submit" value="Send e-mail"/>
</table>
</s:form>
Does anyone know why this happens? The migration guide [1] doesn't
mention forms or validations as far as I can see.
Henrik
[1]
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org