Here is my code for a validating the username/password in login page using
struts 2's "requiredstring" validator
Login.java -> Action class
struts.xml
login.jsp
Login-validation.xml
Login.properties
# To change this template, choose Tools | Templates
# and open the template in the editor.
password.required = Password is required.
username.required= Username is required.
Success.jsp
Login.java, Login-validation.xml, Login.properties are all in the same folder "example.mine".
Also i get this in my
tomcat console,
Feb 11, 2013 11:07:56 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Parameter [password] is not on the excludeParams list of patterns and will be appended to action!
Feb 11, 2013 11:07:56 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn
WARNING: Parameter [userName] is not on the excludeParams list of patterns and will be appended to action!
If i don't give the password or username or both, i get the login page again without the message.
PLEASE help me find out why i am not getting the messages?