I am new to Struts2 and OGNL and am making a simple web application with a registration page. There are two fields, password
and repassword
(to re-enter the password) and using the validation framework i would like to validate that the two passwords match (I know that I can do it easily with JavaScript). Here is what I've got so far. All of the field-validators are working fine. This is my first non-field validator and I just cant get it to work.
<validator type="expression">
<param name="expression">${password}!=${repassword}</param>
<message>Passwords must match.</message>
</validator>
I tried both with
${password}!=${repassword}
and without
password!=repassword
the OGNL tags.