struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ananda Chaudhuri" <meg...@hotmail.com>
Subject RE: Dynamic validation and server side validation
Date Fri, 23 Aug 2002 01:04:52 GMT
[ServletException in:/jsp/security/action/login-body.jsp] Exception creating 
bean of class org.apache.struts.action.DynaValidatorForm: {1}'
is the error message i get for this kind of configuration.

<form-beans>
	<form-bean name="loginForm"
		   dynamic="true"
		   type="org.apache.struts.action.DynaValidatorForm">
	 <form-property name="email" type="java.lang.String" />
	 <form-property name="password" type="java.lang.String" />
	</form-bean>
</form-beans>

<!-- ========== Action Mappings ============================== -->

<action-mappings>
  <action path = "/login"
	  parameter="/jsp/security/action/login-body.jsp"
	  type="com.mediamania.struts.security.LoginAction"
	  scope="request"
	  name="loginForm"
	  validate="true"
	  input="/jsp/security/login.jsp">
	<forward name="Success" path="/index.jsp" redirect="true"/>
	<forward name="Failure" path="/jsp/security/login.jsp" redirect="true"/>

  </action>
</action-mappings>


>From: "Zimmer, Robin (SSABSA)" <robinz@ssabsa.sa.gov.au>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
>Subject: RE: Dynamic validation and server side validation
>Date: Fri, 23 Aug 2002 09:24:52 +0930
>
>What problems are you having exactly??
>
>-----Original Message-----
>From: Ananda Chaudhuri [mailto:meghma@hotmail.com]
>Sent: Friday, 23 August 2002 9:11 AM
>To: struts-user@jakarta.apache.org
>Subject: RE: Dynamic validation and server side validation
>
>
>I am having problem having problem with dynamic validation,
>Should my action class extend DynaAction and what about the Form class?
>
>Thanks
>Anand
>
>
> >From: "Zimmer, Robin (SSABSA)" <robinz@ssabsa.sa.gov.au>
> >Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> >To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
> >Subject: RE: Dynamic validation and server side validation
> >Date: Fri, 23 Aug 2002 08:18:27 +0930
> >
> >You need to use either 
>org.apache.struts.validator.DynaValidatorActionForm
> >or org.apache.struts.validator.DynaValidatorForm depding on whether you
> >want
> >to validate the form bean or the action. If you validate the action, you
> >must set the path as the name in the validation.xml file eg:
> >
> >	<!-- This will validate doSomething action-->
> >       <form name="/doSomethingPath">
> >
> >             <!-- Date of Birth -->
> >             <field property="birth" depends="date">
> >                 <arg0 key="prompt.birth"/>
> >             </field>
> >
> >       </form>
> >
> >if you validate the form, you supply the form name. eg:
> >
> >	<!-- This will validate someForm bean -->
> >       <form name="someForm">
> >
> >             <!-- Date of Birth -->
> >             <field property="birth" depends="date">
> >                 <arg0 key="prompt.birth"/>
> >             </field>
> >
> >       </form>
> >
> >Plus of course you need the plugin stuff in you config file:
> >
> >     <!-- ========== Plugin Definitions
> >====================================== -->
> >     <!-- Add multiple validator resource files by setting the pathname
> >property -->
> >     <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
> >         <set-property property="pathname"
> >value="/WEB-INF/validator-rules.xml"/>
> >         <set-property property="pathname"
> >value="/WEB-INF/validation.xml"/>
> >     </plug-in>
> >
> >Best of luck. Let me know if it doesn't work.
> >
> >-----Original Message-----
> >From: Jan Fetyko [mailto:janof@phase2online.com]
> >Sent: Friday, 23 August 2002 5:59 AM
> >To: struts
> >Subject: Dynamic validation and server side validation
> >
> >
> >Hi all,
> >
> >I'm just getting to know the DynaActionForm and trying to use it on one
> >form I have, it looks like that it's generationg the JavaScript to
> >validate the form in the browser, but the server side validation doesn't
> >work for some reason.
> >
> >What am I doing wrong ?
> >
> >Jf
> >
> >
> >Some config files "cuts":
> >
> >struts-config.xml
> >
> >	<form-bean name="NewDealerForm"
> >                 	type="org.apache.struts.action.DynaActionForm"
> >                 	dynamic="true">
> >         <form-property name="bussinessName" type="java.lang.String"/>
> >	 </form-bean>
> >
> >    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
> >      <set-property property="pathnames"
> >value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> >    </plug-in>
> >
> >
> >
> >validation.xml
> >
> >
> >
> >      <formset>
> >
> >          <!-- An example form -->
> >          <form name="NewDealerForm">
> >              <field
> >              	property="bussinessName"
> >                  depends="required">
> >                      <arg0 key="errors.generic"/>
> >               </field>
> >          </form>
> >
> >      </formset>
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail:
> ><mailto:struts-user-help@jakarta.apache.org>
>
>
>Ananda Chaudhuri
>4344 Kissena Blvd 16K
>Flushing NY 11355
>718 305 2277
>http://www.cosyeye.com
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail:
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:struts-user-help@jakarta.apache.org>
>


Ananda Chaudhuri
4344 Kissena Blvd 16K
Flushing NY 11355
718 305 2277
http://www.cosyeye.com

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message