From: "Vicky" <[EMAIL PROTECTED]> > My action class extends LookupDispatchAction, which > has different methods in it. In struts-config.xml i > have parameter method as we all know. My problem is; > in my validation.xml i do have to perform different > validations for different methods, how do I > distinguish or find out which method is called to > perform validation for that method only?
Because you're using DynaValidator_Action_Form, the framework will match up the <action> 'path' attribute from struts-config.xml with the <form> 'name' attribute from validation.xml. I do it by having different URL patterns mapped to the same LookupDispatchAction using the same DynaValidatorActionForm. In the <action> tag, only the 'path' and 'input' differ (so 'getInputForward()' works, no matter which path you came in with, you go to the right form-- it's a four-step wizard.) <action path="/denRegister" type="edu.example.RegisterAction" name="registerForm" ... input="den.register.step1"> ...</action> <action path="/denRegister3" type="edu.example.RegisterAction" name="registerForm" ... input="den.register.step3"> ...</action> Then in validation.xml, you use the path for the form "name" (which is slightly confusing...): <form name="/denRegister"> ... </form> <form name="/denRegister3">... </form> And then you can have different fields validated for different paths, even though it's the same Action and the same Form. All my forms are POSTed, so I wouldn't have had ?parameter=someText in any case. HTH, -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]