Java class for validating user input
If any of the if statements are true, Struts 2 will call its method (which our Action class inherited by extending Action Support).
Once we have the values we can employ logic to enforce our business rules.
The Java programming language distinguishes between null and empty strings.
An empty string is a string instance of zero length, whereas a null string has no value at all.
This tutorial will cover the more basic method, where the validation is included in the Struts 2 Action class.
The Struts 2 user mailing list is an excellent place to get help.
If you are having a problem getting the tutorial example applications to work search the Struts 2 mailing list.