Hi All, I m working for service side POJO validation using xwork. I am having an action say ValidationAction.java and i have a corresponding xml file named ValidationAction-validation.xml having validation rules on fields.
As per specification and wherever i cud find,i have come to know that this xml file should be kept in the same package as the ValidationAction.java file. But since i do have many java files to go through validations and hence many corresponding xml files, i dont want to put them together in the same package. I want to have different folder/package for the xml files.
As long as they're *deployed* correctly it doesn't matter where they live during development.
Joined: Aug 24, 2010
Thank you for your immediate reply.
I would like to be execusd for my ignorance.
I m trying to use xwork for the POJO validation as if i will execute a method to call the validate() method of ActionValidatorManager class. so no concern with server and deployment. I m trying to use it as a part of TestCase.
I even sniffed around the source code of DefaultActionValidatorManager class and there they are using the following code to find the corresponding xml file for the action object being supplied to the validate() method.
So my hope got shedded after looking into the source code.
i even thought of creating my custom validatorManager class extending ActionValidatorManager class and just changing the code where its trying to find the validation xml file, but cudnt make it work out.
But i feel there must some other better and simpler way for doing this.