Well you also get a default execute method which returns success, so you can create empty actions if there is no business logic. It also implements a lot of interfaces like TextProvider for your convenience. Look at the ActionSupport documentation...
Well there is a Map of validation errors in the ActionSupport class. So when you call the addFieldError method, your field name is added as the key to a new entry in the map and the message is added as a value to the new entry. It goes like this
The original code might not look exactly like this in ActionSupport class but this is just the concept...
Joined: Feb 28, 2009
Thanks Ankit .
But i was an expecting a answer in terms of workflowinterceptor which automatically does the work . If you know this can you please give an idea on this .
Well I couldn't understand your question properly, but the workflow interceptor calls the ActionSupport.hasFieldErrors() to check if there were any errors during call to validate method and if that method returns true, then workflow interceptor stops the execution of the request and returns the input page configured for that action to the user...
All of the validation and I18N is implemented by ActionSupport; if you don't extend it, and you want validation and I18N to work, you must implement it all yourself, which seems like a lot of work for something that's already provided.