Interesting. I think the error you are getting from the DAO layer would be helpful. When you say the validation is not working, is the validation you want not firing or an exception is being thrown by a DAO? Or an exception is thrown because your validations are not firing? What does your action class look like? Does it extend ActionSupport? If your validations are not firing, the other place to look is in the interceptor stack. In struts.xml the validation and workflow interceptors have "excludeMethod" parameters that will prevent validation from firing. If you have customized the validation stack you may not have validation or workflow included.
It's probably hard to guess without knowing the DAO layer error, the Hibernate mapping of the field involved, the Action setup and struts.xml config. -D On Dec 19, 2010, at 7:39 AM, Ramzi MAALEJ wrote: > I have two files generated by Appfuse > Sport-validation.xml, I put it in model package and the second one > SportAction-validation i put in webapp.action.sport package which using > visitor validator. > I'm testing validation by simply running the application using mvn:jetty > run-war, I get errors from dao layers not from validation layer. > > > > On 2010-12-19 00:47, DUSTIN PEARCE wrote: >> What validation files were created? For the model? What is there path >> location? If you just have model validation it will not work since you need >> to add a Visitor validator to the action that uses the model. Check to see >> if the action validation files are there. If they are post the package path >> for your actions and the file locations and names of your validation files. >> Finally explain how you are testing the validation? Mvn:jetty? >> >> On Dec 18, 2010, at 7:56 PM, Ramzi MAALEJ <ramzi.atv...@gmail.com> wrote: >> >>> Hi all, >>> >>> I did create an application using Struts framework. I generated all the >>> needed stuff for my pojo and deployed the application successfully but the >>> validation is not working. >>> The validation files are generated but it seems to be that they aren't used. >>> I followed the tutorial that talk about this problem, I didn't succeed to >>> have validation working. >>> Please note also that my actions are in a second package under *.action >>> package. >>> >>> Thank you >>> -- >>> Best regards, Ramzi MAALEJ >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net >>> For additional commands, e-mail: users-h...@appfuse.dev.java.net >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net >> For additional commands, e-mail: users-h...@appfuse.dev.java.net >> > > > -- > Best regards, Ramzi MAALEJ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net > For additional commands, e-mail: users-h...@appfuse.dev.java.net > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net