Hi!

I'm working on an application where HibernateValidator does not work as 
excpected when running on Resin 4.0.7 but just fine when running on jetty 
6.1.22 with "mvn jetty:run".

We have annotated our domainobjects which we try to validate like f.x.

    @NotEmpty
    private String title;

In our submit method we are looking at the BindingResult to see if we have any 
validation errors:

   @RequestMapping(value = "/edit.html", method = RequestMethod.POST)
    public ModelAndView submit(@ModelAttribute("commandObject") @Valid final T 
commandObject,
            final BindingResult result, final HttpServletRequest request) {

      if (result.hasErrors()) {
        // handle validation errors
      } else {
        // save and be happy :)
     }
  }

If we try to submit a form where some of the properties with @NotEmpty 
annotations is empty the method result.hasErrors() returnes true (as expected) 
when running on jetty but not when running on Resin. Strange?

We are using HibernateValidator 4.0.2, Spring 3.0.2, Hibernate 3.5.3 (not JPA) 
and Resin 4.0.7.

I have a small demo project which reproduce this issue which can be found on 
http://folk.uio.no/erlendfg/validator_test/validator_test.zip

To run just use "mvn jetty:run" and it is available at 
http:/localhost:8080/validator_test

TIA for any what so ever hints or ideas on how to get closer to a solution on 
this issue! :)


-Kaj :)

_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to