I am trying to do validation on a Map using struts 2. When I click on the submit button, the error message will always appear even though I have inserted a value into the textbox. Is there anyway for it to work? Any help will be much appreciated. The following is my file
In my new.jsp
<s:textfield name="myObject.myMap['name']" key="name" ></s:textfield>
In the validaton.xml
<validators>
<field name="myObject.myMap['name']">
<field-validator type="requiredstring">
<message key="errors.required"/>
</field-validator>
</field>
</validators>