What version of Struts are you using and what version
of the Validator?

David

--- Mike Bridge <[EMAIL PROTECTED]> wrote:
> Hi-
> 
> When I submit (or access) a ValidatorForm, it goes
> into an infinite
> loop.  I had this working with 0.5, but after
> upgrading, it doesn't
> seem to function any more.  I've done the following
> to set it up:
> 
> 1) set up a validator.xml from the example, removing
> the existing bean
> definition and adding:
> 
>    <formset>
>       <form name="surveyForm">
>          <field property="givenname"
> depends="required">
>          <arg0 key="form.givenname"/>
>          </field>
>          <field property="familyname"
> depends="required">
>          <arg0 key="form.familyname"/>
>          </field>
>          <field property="email"
> depends="required,email">
>          <arg0 key="form.email"/>
>          </field>
>       </form>
>     </formset>
> 
> 2) Added the following to my struts-config.xml
> 
>   <form-beans>
>     <form-bean      name="surveyForm"
>                    
> type="ca.oldring.forms.SurveyForm"/>
>   </form-beans>
> 
>   <global-forwards>
>     <forward name="survey1_en"
> path="/survey1.jsp?language=en"/>
>     <forward name="survey1_fr"
> path="/survey1.jsp?language=fr"/>
>   </global-forwards>
> 
>   <action-mappings>
> 
>     <!-- Process a survey -->
>     <action    path="/survey"
>               
> type="ca.oldring.actions.SurveyAction"
>                name="surveyForm"
>              scope="request"
>                validate="true"
>              input="/survey.do">
>     <forward name="thanks" path="/thanks.jsp"/>
>     </action>
>   </action-mappings>
> 
> 3) Made a bean "SurveyForm" with generic get and set
> methods
> 
> 4) Set up web.xml:
> 
> 
>    <servlet> 
>         <servlet-name>validator</servlet-name> 
>        
>
<servlet-class>com.wintecinc.struts.action.ValidatorServlet</servlet-class>
> 
>         <init-param> 
>            <param-name>config</param-name> 
>           
> <param-value>/WEB-INF/validation.xml</param-value> 
>         </init-param> 
>         <init-param> 
>            <param-name>debug</param-name> 
>            <param-value>2</param-value> 
>         </init-param> 
>         <load-on-startup>3</load-on-startup> 
>    </servlet> 
> 
> 5) copied the tld and the
> Struts_Validator-20010702.jar 
> 
> 
> When I access the "survey.do" file, the tomcat
> servlet log gives
> me this until java segfaults:
> 
> 2001-09-17 16:53:40 - path="/survey" :action:
> Processing a GET for /survey
> 2001-09-17 16:53:40 - path="/survey" :action:
> Setting locale 'en'
> 2001-09-17 16:53:40 - path="/survey" :action: 
> Looking for ActionForm bean under attribute
> 'surveyForm'
> 2001-09-17 16:53:40 - path="/survey" :action: 
> Creating new ActionForm instance of class
> 'ca.oldring.forms.SurveyForm'
> 2001-09-17 16:53:40 - path="/survey" :action: 
> Storing instance under attribute 'surveyForm' in
> scope 'request'
> 2001-09-17 16:53:40 - path="/survey" :action: 
> Populating bean properties from this request
> 2001-09-17 16:53:40 - path="/survey" :action: 
> Validating input form properties
> 2001-09-17 16:53:40 - path="/survey" :action:  
> Validation error(s), redirecting to: /survey.do
> 2001-09-17 16:53:40 - path="/survey" :action:
> Processing a GET for /survey
> ...
> 
> Any ideas on why this is looping?  It doesn't appear
> to be reaching my
> Action class.
> 
> Thanks,
> 
> -Mike
> 
> 
> -- 
> Mike Bridge 
> <[EMAIL PROTECTED]>


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Reply via email to