Today, I encountered a strange problem. After the view layer is submitted, an error is reported without going to action. The error is "the corresponding action cannot be found ".
I thought I had an error in the configuration in my struts or spring configuration file, and I checked it again. I found that the configuration was okay. I tried again and encountered this problem. Ask a colleague for help and check again to confirm that the configuration is correct. debug is followed to JS, and no error is found. Later, I found another colleague, dedug step by step, and finally found that an error occurred when the view layer sent the data to VO.
In Vo, the field life is long, but the view layer passes over a string, so an error occurs during conversion.
The common method for obtaining parameters at the view layer in the background is to accept the parameters through the getparameter method of httprequest, and Struts encapsulates the operations for receiving parameters, you can use VO to receive parameters transmitted from the page. getparameter gets all the parameters of the string type. If vo is a non-string type variable, type conversion is required, errors may occur in this process. The methods I encountered above belong to this type.
Summary:
The error cause "action" cannot be found:
1. configuration file Error
2. Data Type Error