tags:

views:

13

answers:

0

I'm practising Spring MVC.But fail to populate command object in Controller when I use spring standard tag. For example: "form:input path="password""

But I perfectly do this with HTML standard tag. Like: "input type="text" name="password""

I wonder the way how to use Spring tag binding data. In addition, I think configuration and coding is right in my sample.

protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response,                                                                         
          Object command, BindException errors) throws Exception {
    UserFormBean b = (UserFormBean)command;
    System.out.println("s");
    return super.onSubmit(request, response, command, errors);
}

<form:form commandName="command" action="/SpringFrame/register.html">
    <form:input path="password"/>
    <!-- <input type="text" name="password"/> -->
    <input type="submit"/>
</form:form>