This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hello All, I'm converting a simple simple form application to use the DynaValidatorForm and I believe I have the plugins and xml files configured properly. My question is: how do I code for the validation in the action class? My code is: public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { DynaValidatorForm f = (DynaValidatorForm) form; System.out.println(f.toString()); //ActionErrors errors = new ActionErrors();
// Report any errors we have discovered back to the original form if (!errors.empty()) { saveErrors(request, errors); return new ActionForward(mapping.getInput()); }
// Forward control to the specified success in the struts-config.xml file. return (mapping.findForward("success")); } but ActionErrors never get thrown, even though I use "required" to check for null fields on the submit from the jsp form.