In Struts 2, "input" is returned when a check fails in the validate() method. I then map <result name="input"> in struts.xml for the appropriate page.
I am just wondering how it gets the "input", which is a String when the validate() method itself returns void?
@Override
public void validate() {
// if checks here
}
I would like to understand this concept.
The
validate()method itself returns nothing (void). It's invoked byvalidationinterceptor.But after this interceptor usually is going
workflowinterceptor. This interceptor is responsible to returnINPUTresult if the actionhasErrors().