Struts1 Validation

Process of verifing the format & correctness of the html/jsp form data like required field are typed or not.
There are two types of validation in any application.

  1. client side validation.(using javascript .js)
  2. server side validation.(using server side technology like servlet,jsp)

Struts based server side validation

  1. using programmatic approach using validate(—-) of formBean class.
  2. using Declerative approach using validator f/w plugin.

Server side validation example

When ever we deploy this program in any server this program we used programmatic validation logic those validation logic written in files under of Validate methods.with the help of file this generate any errors messages again with the help of tags in jsp pages it display errors messages.
Example deploy the application and we input the given field in browser if forget to fill any singles field and click submit button then result display enter those field.