To avoid having to do with HTTP 404 errors in the future, decide to write down every time you encounter this type of error in case of a query.
Because no struts2 before, can normal access to the application directory files, after configuration access to files are reported 404 errors, so determine is STRUTS2 configuration error, and then look up from the Internet, found that many people have a similar error, a lot of solutions, there are:
A. When visiting, the wrong URL was written;
B.web.xml configuration error, Filter-class has two ways of writing, Say how many versions and then use Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter instead It's org.apache.struts2.dispatcher.FilterDispatcher. As to which version after the switch, why changed, left to study later.
C. No struts jar packs were added. Add Jar pack, this question hey, before watching the screen struts2 is, the teacher is using a copy jar package and paste into the package-explorer view of the Lib, but previously all through the BuildPath to add the external jar package, as for the two effects are the same, The difference is what, this later.
D.jar package conflict. Speaking of this is really depressing, you say less can not understand it, this more than one also not, it seems should be summed up which jar pack easy conflict.
Follow the above methods to try each, and found that yes ah, the whole people are crazy, and finally decided to calm down to the beginning of the examination once again, not on hold. Later found that the Struts.xml configuration is more than one action, because it is directly from other projects directly to the Struts.xml so the original action also test came to know that the action is useless, I thought I do not access this action, there will be no problem. The result is the problem, then the extra action is removed and the access is successful.