Its all down to the flavour of ActionForm you use. There a four "validation" flavours 
of ActionForm shipped with Struts:

org.apache.struts.validator.ValidatorForm
org.apache.struts.validator.ValidatorActionForm
org.apache.struts.validator.DynaValidatorForm
org.apache.struts.validator.DynaValidatorActionForm

If your action forms are based on ValidatorForm or DynaValidatorForm then they use the 
associated form name from struts-config.xml to look up the validation rules in the 
validation configuration. If you use ValidatorActionForm or DynaValidatorActionForm 
then they use the path from the struts-config.xml to look up validations.

If you are not happy with either of these mechanisms, then all you have to do is write 
your own ActionForm.validate() method which uses whatever naming you want to access 
validator.

>From the struts-config.xml:

<action path="/myPathName" name="myFormName" ......
</action>

In your validation.xml file:

<form name="/myPathName">
   ......
</form>

Niall
  ----- Original Message ----- 
  From: [EMAIL PROTECTED] 
  To: Struts Users Mailing List 
  Sent: Monday, February 16, 2004 7:57 PM
  Subject: Hoe to use Actionpath in validation.xml???



  Hi All, 
          how to use action paths in validation.xml. 
  Sample code will be greatly appreciated. 

  Thanks in advance. 

  Thanks and Regards
  Subramaniam Olaganthan
  Tata Consultancy Services
  India
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com


------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to