title: Post data form submit with jquery mobile and ajax
body: <p>I'm having problems with submit a form data to a server. I'm using jquery mobile and Ajax to post data, and Spring Mvc to implement the controller. Until the moment i obtain this apache tomcat error: </p>
  
  <p>Estado HTTP 405 - Request method 'GET' not supported</p>
  
  <p>mensaje Request method 'GET' not supported</p>
  
  <p>descripción El método HTTP especificado no está permitido para el recurso requerido.</p>
  
  <p>This is mi Ajax call:</p>
  
  <pre><code>function enviarCita(){      
  
          var frm = $("#regCitaForm").serialize();
  
          alert(frm);
  
          $.ajax({            
              type: "POST",
              url:  url+ '/AgendaProfesional/solicitudCita',
              data: $('#regCitaForm').serialize(),
              dataType: "json",
  
  
              success: function(){
                  $("loading").html("here i am"); 
                  $.post(url+ '/AgendaProfesional/solicitudCita', data);
                  }
          });
              return false;
              e.preventDefault();
  
          };
  </code></pre>
  
  <p>This is my html form to post:</p>
  
  <pre><code>&lt;form  modelAttribute="Solicitud" method="POST" name="regCitaForm"  id="regCitaForm"&gt;
  &lt;input type="text"data-theme="a"  path="nombre_paciente" name="nume" id="nume" size="20" maxlength="33" placeholder="Nombre"/&gt;&lt;br /&gt;
  </code></pre>
  
  <p>.....</p>
  
  <p>(It has more inputs...)</p>
  
  <p>and this is the controller:</p>
  
  <pre><code>@RequestMapping(value="/solicitudCita", method = RequestMethod.POST)
  @ResponseBody
  public String putSolicitud(@RequestBody  Solicitud solicitudCitaAppM){
  
  
  
          System.out.println(solicitudCitaAppM.toString());
  
          solicitudCitaAppMService.createOrUpdate(solicitudCitaAppM);
  
          String solicitudAdded = "Solicitud de cita -&gt; {" + solicitudCitaAppM.toString() + "} añadida";
  
          System.out.println(solicitudCitaAppM);
  
         return solicitudAdded;
  
      }
  </code></pre>
  
  <p>I dont know if I pass the correct atributes to json because the javascript console recognizes the post method but shows 405 error (GET not suported).</p>
  
  <p>Please help me.</p>
  
  <p>Thanks a lot¡</p>