We know that if actionform inherits validatorform, we can perform data verification in the validate () method, and its return is an actionerrors object. However, I found that after verifying invalid data input, because struts only keeps the original actionform object in the request when returning inputforward, therefore, if I have manually directed setattribute () to another object in the request in the action, the system will prompt that the object cannot be found.
The current solution is helpless, that is, to change the object originally put in the request to put in the session, but I am worried that this object will be manually cleared immediately after use, otherwise, it will cause a lot of unnecessary troubles. I do not like to use session objects myself. Especially for data transmission from actions to pages, request should be the most appropriate choice.