Java. Lang. runtimeexception: Invalid action class configuration that references an unknown class name

Source: Internet
Author: User

Java. LanG. runtimeexception: Invalid action class configuration that references an unknown class named [xxxaction].

When using SSH for project development, the above error message may appear accidentally. This article summarizes the development experience of Forum experts and analyzes the causes of this error in detail. We hope you can help students with the same problems:

This problem can be simply understood as the action named XXX is not found.


1) xxxaction does not configure the corresponding action in struts. xml;

Case sensitivity is critical. Check carefully here.Is there any error in the action name method submitted on the page,Is the name in struts. xml incorrect?.


2) If spring is used to manage actions, the corresponding bean may not be configured in the spring configuration file;

Spring injection check


3) if all of the above are excluded, it may be in struts. the result is not configured in the action configuration in XML. Check whether the result item exists or whether the type of the result is correct. Check whether the string returned by the action is spelled correctly;

If an action returns an uppercase Value of "success" or "input", the name attribute of result in struts. xml must be in uppercase. If it is lower-case, lower-case is configured. Otherwise, the above error will occur.


4) if all of the above are excluded, it may be that the data type is incompatible when the form page data is retrieved in the action, for example, the string is loaded into the int type variable;

An error occurred while passing parameters during form submission or hyperlink jump:

1. Is there any set and get methods in the action that receive this parameter?

2. Whether the type of the received parameter in the Action matches the page

 

5) if all of the above are excluded, you may have written the Form Verification validate () method, and you need to carefully check the logic

 

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.