1、
<form-bean name="trDeviceinfoForm" type="com.formulaone.web.TrDeviceinfoForm"></form-bean><form-bean name="trADevicetypeForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="trADevicetype" type="com.formulaone.model.TrADevicetype" />
</form-bean>2、
<action path="/trDeviceinfo" type="org.springframework.web.struts.DelegatingActionProxy" name="trDeviceinfoForm" scope="request" parameter="method" validate="false">
<forward name="list" path="/pages/device/trDeviceinfoList.jsp" />
<forward name="edit" path="/pages/device/trDeviceinfoForm.jsp" />
</action><action path="/trADevicetype" type="org.springframework.web.struts.DelegatingActionProxy" name="trADevicetypeForm" scope="request" parameter="method" validate="false">
<forward name="list" path="/pages/device/trADevicetypeList.jsp" />
<forward name="edit" path="/pages/device/trADevicetypeForm.jsp" />
</action>3、
public class TrDeviceinfoAction extends DispatchAction{
      public ActionForward save(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// run validation rules on this form
ActionMessages errors = form.validate(mapping, request);
if (!errors.isEmpty()) {
saveErrors(request, errors);
return mapping.findForward("edit");
}}4、
public class TrADevicetypeAction extends DispatchAction {
    public ActionForward save(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
// run validation rules on this form
ActionMessages errors = form.validate(mapping, request);
if (!errors.isEmpty()) {
saveErrors(request, errors);
return mapping.findForward("edit");
}}
4中对应的form是trADevicetypeForm为DynaValidatorForm验证没有问题,3验证有问题errors = form.validate(mapping, request),errors执行结果为null,高手帮忙了