Error 500 reported after the first integration of struts2 + spring form submission

Source: Internet
Author: User

Error 500 reported after the first integration of struts2 + spring form submission
Spring + struts2 integration, a user login test program, with a configuration file segment <constant name = "struts. objectFactory "value =" spring "/> <package name =" struts-config "namespace ="/"extends =" struts-default "> <action name =" login "class = "loginAction"> <result name = "frame">/frame. jsp </result> </action> </package> </struts> but the following 500 error is reported after the form is submitted. If you directly write class = "com. system. actionLoginAction "can execute Unable to instantiate Action, loginAction, defined for 'login' in namespace '/'loginaction com. opensymphony. xwork2.defaactionactioninvocation. createAction (defaactionactioninvocation. java: 306) com. opensymphony. xwork2.defaactionactioninvocation. init (defaactionactioninvocation. java: 387) com. opensymphony. xwork2.defaactionactionproxy. prepare (defaactionactionproxy. java: 186) org. apache. struts2.impl. strutsActionProxy. prepare (StrutsActionProxy. java: 61) org. apache. struts2.impl. strutsActionProxyFactory. createActionProxy (StrutsActionProxyFactory. java: 39) com. opensymphony. xwork2.defaactionactionproxyfactory. createActionProxy (defaactionactionproxyfactory. java: 47) org. apache. struts2.dispatcher. dispatcher. serviceAction (Dispatcher. java: 458) org.apache.struts2.dispatcher.ng.ExecuteOperations.exe cuteAction (ExecuteOperations. java: 77) org. apache. struts2.dispatcher. ng. filter. strutsPrepareAndExecuteFilter. doFilter (StrutsPrepareAndExecuteFilter. java: 76) the error indicates that spring failed to create an action for struts2. The possible causes are as follows: 1. struts2-spring-plugin-2.1.8.1.jar not loaded 2. package conflict. Delete asm. jar (described on the Internet) 3. struts or spring configuration file error (refer to my "struts2 + spring integration framework") 4. the spring configuration file name is incorrect. The default spring configuration file is applicationContext. xml, in the web. <context-param> <param-name> contextConfigLocation </param-name> <param-value>/WEB-INF/applicationContext -*. xml, classpath *: applicationContext -*. xml </param-value> </context-param>

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.