Action error solution not found in Java SSH Project

Source: Internet
Author: User

Today, I encountered a strange problem. After the view layer is submitted, an error is reported without going to action. The error is "the corresponding action cannot be found ".

I thought I had an error in the configuration in my struts or spring configuration file, and I checked it again. I found that the configuration was okay. I tried again and encountered this problem. Ask a colleague for help and check again to confirm that the configuration is correct. debug is followed to JS, and no error is found. Later, I found another colleague, dedug step by step, and finally found that an error occurred when the view layer sent the data to VO.

In Vo, the field life is long, but the view layer passes over a string, so an error occurs during conversion.

The common method for obtaining parameters at the view layer in the background is to accept the parameters through the getparameter method of httprequest, and Struts encapsulates the operations for receiving parameters, you can use VO to receive parameters transmitted from the page. getparameter gets all the parameters of the string type. If vo is a non-string type variable, type conversion is required, errors may occur in this process. The methods I encountered above belong to this type.

Summary:

The error cause "action" cannot be found:

1. configuration file Error

2. Data Type Error

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.