problem
Error message shown:
404 error usually occurs because the file can not be found, so be sure to pay attention to some questions about the configuration file path, the path must correspond, if there is no corresponding, 404 occurs. But I came to this 404 error, not because the path configuration issue, but a very strange question, I have a place to extend the inheritance, there is a problem.
Solution
1, looking in the wrong, what is wrong
We must first learn the wrong, how to see what is wrong, this is the most important, I do not even know what's wrong, just know that 404 is not enough, the 404 covers a lot of mistakes. Tomcat server running from the controller seen, looking Caused by, behind it is the problem to be solved.
I find wrong is the Parent package is not defined: struct- default, as shown in FIG.
2, find the corresponding file wrong
Struct generally we see the word, thought to see the profile struct.xml, of course, really do not know, you can search directly for full project.
Then find struct-default file from struct.xml
3, change the error
The first case
This situation is exactly the situation I encountered due to clerical error
will change struct-default struts.xml file for either the struts-default
The second case
May not be introduced into the corresponding jar package
incorporated struts2-json-plugin-2.3.15.3.jar package, of course, also be other editions.
The third case
If the top two kinds of writing there are no errors, but also introduced a jar package or not, you can extends another, is json-default
to sum up
Through this resolve this error, found on the struts have inherited struts-default and json-default, then maybe has what difference does it make? After some review, the original json-default inherited struts-default, which is primarily to achieve json struts2 and combined, the json plugin is to achieve struts2 struts2 and combine the json.