title: Spring 3 + Tiles 2 form error
body: <p>I am getting this error when i click submit on a form in Spring 3 + Tiles 2...i dont know but the other pages which are not form work fine...The code for that is :</p>
  
  <p>Error 500--Internal Server Error
  java.lang.ClassCastException: org.springframework.web.bind.ServletRequestDataBinder cannot be cast to org.springframework.web.bind.support.WebRequestDataBinder
  at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:754)
  at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:744)
  at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:296)
  at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:163)
  at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:354)
  at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:342)
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:763)
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:709)
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:613)
  at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:536)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
  at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
  at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
  at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
  at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
  at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
  at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
  at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
  at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)</p>
  
  <hr>
  
  <pre><code>package com.ultimatix.framework.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.ModelAttribute;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.bind.annotation.SessionAttributes;
  import org.springframework.web.servlet.ModelAndView;
  
  import com.ultimatix.framework.vo.Contact;
  
  @Controller
  @SessionAttributes
  public class ContactController
  {
      @RequestMapping(value = "/addContact", method = RequestMethod.POST)
      public ModelAndView addContact(@ModelAttribute("command")Contact _objContact)
      {
          System.out.println(_objContact.toString());
          return new ModelAndView("welcome");
      }
  
      @RequestMapping("/contact")
      public ModelAndView showContacts()
      {   
          return new ModelAndView("contact", "command", new Contact());
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%&gt;
  &lt;%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Spring 3.0 + Tiles 2.0 - Contact Manager&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h2 align="center"&gt;Contact Manager&lt;/h2&gt;
  &lt;form:form method="post" commandName="command" action="addContact.do"&gt;
      &lt;table border="0" cellpadding="2" cellspacing="2" align="center"
          width="50%"&gt;
          &lt;tr&gt;
              &lt;td width="30%"&gt;First Name&lt;/td&gt;
              &lt;td width="70%"&gt;&lt;form:input path="strFirstName" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td width="30%"&gt;Last Name&lt;/td&gt;
              &lt;td width="70%"&gt;&lt;form:input path="strLastName" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td width="30%"&gt;Email&lt;/td&gt;
              &lt;td width="70%"&gt;&lt;form:input path="strEmailId" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td width="30%"&gt;Contact No.&lt;/td&gt;
              &lt;td width="70%"&gt;&lt;form:input path="strContactNo" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td width="30%" align="center"&gt;&lt;input type="submit" value="Add Contact" /&gt;&lt;/td&gt;
              &lt;td width="70%"&gt;&lt;input type="reset" value="Clear Details" /&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form:form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>