Http://cache.baidu.com/C? WORD = action % 3B % 2e % 3 bactionmessage % 2 ccannot % 2cbe % 2 ccast % 2cto % 2 corg % 3B % 2e % 3 bapache % 3B % 2e % 3 bstruts % 3B % 2e % 3 baction % 3B % 2e % 3 bactionerror & url = http % 3A // kg0606grp % 2 Espaces % 2 elive % 2 ECOM/blog/CNS % 4154fd59307720974a % 21121% 2 eentry & P = c079c54ad2c35af406be9b7e07508a & User = Baidu
Org. Apache. Struts.
Action. actionmessage
Cannot
Be
Cast
To
Org. Apache. Struts. Action. actionerror your struts version.
There are several classes in total
Actionmessage
Actionmessages
Actionerror
Actionerrors
Where
One singular is a single message, and the plural is the information container.
2 error, other messages
3 error (s) inherited from message (s)
This is a previous version, but the error (s) of the new version is deprecated, but the return type of the validate method is streamed for compatibility. However, the new version uses actionerrors. Add (Actionmessage), While the old version uses actionerrors. Add (actionerror)
In my estimation, the example is 1.2, and the running version is 1.1, which leads to an error message in the validate verification. After redirecting back to the JSP specified by <action input>, when you encounter <HTML: errors>, 1.1 still thinks that actionerrors contains actionerror, whileCast, The result is
Java. Lang. classcastexception:Org. Apache. Struts. Action.Actionmessage Cannot Be Cast To Org. Apache. Struts. Action. actionerror