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