On Jun 9, 2003, Kevin Robair <[EMAIL PROTECTED]> wrote: |In your struts-config.xml, check to see if you have |this: | |<controller> | <!-- The "input" parameter on "action" elements is |the name of a local or global "forward" rather than a |subapp-relative path --> | <set-property property="inputForward" value="true" | | /> |</controller>
Kevin, I don't have any controller section in my struts-config.xml. And, according to the O'Reilly book, I don't need one to do this (at least they didn't mention it). In fact, the O'Reilly book shows the html being updated with "* First Name is required..." when the user submits an incomplete form. Does struts automatically rewrite the html output of the jsp to include the errors? Very unclear to me... Kinda like magic. That said, I think I may not have made part of my desctiption clear. I said "Changing the form method to GET, the url is ...<formname>.do... after the submit.". What I meant by <formname> was not the name of the form bean, but the name of the action in the jsp's html:form tag. In other words, the name of the action associated with the form, SaveTWSItem. Also, LOCCreateParticipants.jsp may have been a typo in the action - that jsp is a tile inside of LOCCreate.jsp (which was not referenced in my code snippet). I changed my action to reflect that, but I am still having the same problem. If you still think I should pursue the global forward (not an ideal solution to me - I don't want too many "globals"), I will. But I'm open to other solutions. Actually, let me ask this question in another way: can someone explain the path struts takes when validating using a DynaValidatorForm with a validation error? How does the app get notified there is a validation error? Thanks, /greg p.s. I'm attaching the code again... -- Gregory F. March -=- http://www.gfm.net:81/~march -=- AIM:GfmNet struts-config.xml: <form-bean name="LOCCreateForm" type="org.apache.struts.validator.DynaValidatorForm"> <form-property name="CompanyOrDivisionID" type="java.lang.String"/> <form-property name="Destination" type="java.lang.String"/> <form-property name="CRN" type="java.lang.String"/> <form-property name="ApplicantID" type="java.lang.String"/> ... <action path="/SaveTWSItem" type="com.mycompany.web.action.SaveTWSItemAction" scope="session" name="LOCCreateForm" validate="true" input="/LOCCreate.jsp" parameter="action"> <forward name="Success" path="/mainpage/mainpage.jsp" redirect="true" /> <forward name="Failure" path="/errors/general.jsp" redirect="true" /> ... validation.xml: <form-validation> <formset> <form name="LOCCreateForm"> <field property="CRN" depends="required,mask"> <arg0 key="loc.create.crn"/> <var> <var-name>mask</var-name> <var-value>^[0-9]*$</var-value> </var> </field> </form> </formset> </form-validation> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]