Disclaimer: This blog for the original blog, without permission, not reproduced! Small partners if they are seen in other places, suggest or csdn to see it (the original link address is http://blog.csdn.net/bettarwang/article/details/39650937), after all, on the CSDN It 's more convenient to look at the code and ask questions and discussions.
As you all know, you can use the DMI (dynamic method invocation) to perform an action corresponding to multiple form actions, and tonight, when you try to sign in and register an example of two form actions, it always pops up "there is no action Mapped for action name mylogin!regist "error, check a lot of times, Struts.xml and JSP files are not wrong, SRC can also compile through, but click Register always pop up the above error.
Toss for more than half an hour, and finally find the reason, it turns out that the dynamic method call in the configuration item is not open because the Struts2 default is not to allow dynamic method calls. Find the reason to do it, there are two ways to solve:
The first is to add the following sentence to the Struts.xml:
<constant name= "Struts.enable.DynamicMethodInvocation" value= "true"/>
The second is to create a new properties file under SRC, plus struts.enable.DynamicMethodInvocation = True.
Personal Recommendations The first method is used because the second method is actually reserved for backwards compatibility, but the new configuration method is configured using an XML file.
There is no Action mapped for action name mylogin!regist error reason