S2h-http Status 404-no result defined for action and result input error resolved

Source: Internet
Author: User

Doing a small project today, using SSH, results in HTTP Status 404-no result defined for action and result input error at run time.

First, carefully check all the configuration files, namespaces, paths, names are no problem.

So a variety of search information, and finally found that the Validate checker to engage in ghosts.

Analysis:

Because I wrote the method in Registeraction, and the verifier file named Registeraction-validation.xml, that's all the methods in Registeraction, So that when I call the Getallregister () method every time I query all the results, there is an error of no result defined for action and result input.

Later changed to Registeraction-addregister-validation.xml, that is, only the Addregister method to check.

Problem solving.

 Packagesshlab10.s2h.action;Importjava.util.List;ImportSshlab10.s2h.dao.HibernateDao;ImportSshlab10.s2h.dao.impl.HibernateDaoImpl;ImportSshlab10.s2h.entity.Register;ImportCom.opensymphony.xwork2.ActionSupport;ImportCom.opensymphony.xwork2.ModelDriven; Public classRegisteractionextendsActionsupportImplementsmodeldriven{/**     *      */    Private Static Final LongSerialversionuid = 1L; PrivateString Password2; PrivateRegister Register; PrivateList<register>users; PrivateHibernatedao Hibernatedao;  Publicregisteraction () {Register=NewRegister (); Hibernatedao=NewHibernatedaoimpl (); }         PublicString GetPassword2 () {returnPassword2; }     Public voidSetPassword2 (String password2) { This. Password2 =Password2; }     PublicList<register>getusers () {returnusers; }     Public voidSetusers (list<register>users) {         This. Users =users; }         PublicString Getallregister () {Users=Hibernatedao.getallregister (); return"Show"; }         PublicString Addregister () {hibernatedao.addregister (register); returnSUCCESS; } @Override PublicObject Getmodel () {//TODO auto-generated Method Stub        returnRegister; }    }
registeraction

Summarize:

S2h-http Status 404-no result defined for action and result input error resolved

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.