Declarative validation example

When ever we deploy this program in any server this program we used Declarative validation logic those validation declare in validation.xml files under of tags. We declare form bean names, fields property depends with the help of ApplicationResources.properties file this generate any errors messages again with the help of tags in jsp pages it display errors messages.

Index.jsp

Success.jsp

Fail.jsp

Web.xml

Struts-config.xml


Validation.xml

ApplicationResources.properties

LoginAction.java

LoginForm.java