I am new to Struts2 and OGNL and am making a simple web application with a registration page. There are two fields: passwordand repassword(for re-entering the password), and with the help of the verification framework, I would like to confirm that both passwords are the same (I know that I can do this using JavaScript). Here is what I got so far. All field validators work fine. This is my first non-field validator, and I just can't 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
OGNL tags.
source
share