Today, I encountered this problem when I was using STRUTS2.
Struts have detected an unhandled exception:
| Messages: |
There is no action mapped for namespace [/] and Action name [] associated with context path [/SSM1]. |
The Struts.xml file at this time is as follows:
<?xml version= "1.0" encoding= "UTF-8"? ><! DOCTYPE struts public "-//apache software foundation//dtd strutsconfiguration 2.3//en" "/HTTP/ Struts.apache.org/dtds/struts-2.0.dtd "><struts><constant name=" Struts.enable.DynamicMethodInvocation "value=" false "/><constant name=" Struts.devmode "value=" true "/>< Constant Name= "struts.objectfactory" value= "Spring"/> <package name= "Default" namespace= "/" extends= " Struts-default "> <!--Note: Here's class-- <action name=" student_* "class=" studentaction "method=" {1 } "> <result name=" add_success ">/add_success.jsp</result> </action> </ Package></struts>
Solution:
<?xml version= "1.0" encoding= "UTF-8"? ><! DOCTYPE struts public "-//apache software foundation//dtd struts Configuration 2.0//en" "/http Struts.apache.org/dtds/struts-2.0.dtd "><struts><constant name=" Struts.enable.DynamicMethodInvocation "value=" false "/><constant name=" Struts.devmode "value=" true "/>< Constant Name= "struts.objectfactory" value= "Spring"/> <package name= "Default" namespace= "/" extends= "< Span style= "Background-color:rgb (255, 255, 0); >struts-default</span> > <!--Note: Here's class-- <action name= "student_*" class= " Studentaction "method=" {1} "> <result name=" add_success ">/add_success.jsp</result> </ Action> </package></struts>
So, pay more attention to the configuration items in the Struts.xml, the key points of detail, must be handled well.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
STRUTS2 Configuration Error There is no action mapped for namespace [/] and Action name [] associated with context