Unable to instantiate Action, xxxaction, defined for ' xxx ' in namespace '/' Xxxaction solution
September 05, 2014? Comprehensive? A total of 401 words? Small size medium big? Comments Off
There are two main reasons for this problem
1, if the project does not use spring, then in the Struts.xml configuration file, the path of the action's class attribute is not complete, it should be the package name. Class Name
2. If the project uses spring, it is that Applicationcontext.xml does not define the bean for this action. The value of the class property of the corresponding action in the strus.xml is the ID of the bean in the spring configuration file, such as:
Applicationcontext.xml
<bean id= "adminaction" class= "Go.derek.action.AdminAction" scope= "prototype" ></bean>
Struts.xml
<action name= "admin" class= "adminaction" method= "Execute" ><result>/admin.jsp</result></ Action>
3. Supplement may also be @controller ("unitaction") unit case-sensitive issues
Unable to instantiate Action, xxxaction, defined for ' xxx ' in namespace '/' Xxxaction