Spring and STRUTS2 integration in the time because of the effect of a problem encountered, a half-day God finally found the problem, so share out hope that the vast number of Bo friends warning!!
We all know that when spring and struts2 are integrated, Spring takes over the creation of the action object, so be sure to configure the action in the spring configuration file, where you need to be aware of configuring <bean id= "???" > in the ID,
To configure <action class= "???" in Action with Struts.xml >class is consistent, otherwise the following problems will arise:
Landlord is because the Struts.xml configuration action in the class as the action path, resulting in this problem, so the pro must pay attention!
Error configuration code: Applicationcontext.xml <bean id= "cartaction" class= "Com.ansibee.shop.web.action.CartAction" Scope= "Prototype" >
Struts.xml <action name= "cart_*" class= "com.ansibee.shop.web.action.CartAction" method= "{1}" >
Correct configuration code: Applicationcontext.xml <bean id= "cartaction" class= "Com.ansibee.shop.web.action.CartAction" Scope= "Prototype" >
Struts.xml <action name= "cart_*" class= "cartaction" method= "{1}" >
Spring and STRUTS2 Integration error HTTP Status 500-unable to instantiate Action