There is no Action mapped for action name mylogin!regist error reason

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.