Some clarification to my previous post: if I add in the missing required field headWeight, then the action gets called and everything's fine. otherwise, it would not even construct the action, it happened before action gets constructed and called.. If a field is missing, shouldn't it just populate the bean and forwards back to the input page with the error msg instead of giving a mysterious error? what's wrong with the way i m using struts validation?
--- wo_shi_ni_ba_ba <[EMAIL PROTECTED]> wrote: > It seems like if I specify a field as required in > struts's validation-rule.xml and that field is > missing > from the form, when i submit the form it would say > file not found /actionName without spitting out an > exception. It is as if it's seeing the action > specified by actionName as a file... any idea why? > thanks > Here is my validation-rule.xml: > <form name="saveSoldierInfoForm"> > <field property="gender" depends="required"> > <arg0 key="soldier.gender"/> > </field> > <field property="headWeight" depends="required"> > <arg0 key="soldier.headWeight"/> > </field> > </form> > > Here is my action-mapping: > <action path="/saveSoldierInfo" > name="saveSoldierInfoForm" > > type="com.xxx.software.xxx.soldier.SaveSoldierInfoAction" > input="saveSoldierInfo"> > <forward name="success" path="/Login.jsp"/> > <forward name="failure" path="/Home.jsp"/> > </action> > > > Here is my form embedded in the jsp > <form name="saveSoldierInfoForm" method="post" > action="/HSM/saveSoldierInfo.do"> > <td> <input type="text" name="gender" > value=""> > </td> > <td height="20"> <input type="submit" > value="sub"></td> > </form> > > > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]