title: 404 error with Ajax request
body: <p>I need to grab some data from a JSP page that does a select on a database and then put inside a div. I need to do this with ajax.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$(function() {
      teste();
  });
  
  function teste() {
      var v1 = document.getElementById("selCodigo").value;
      alert(v1);
  
      $.ajax({       
         type : "GET",
         data : "turma="+v1,
         url : "busca-notas.jsp",       
         success : function(resposta){
             alert("DEU CERTO");
         },
         error : function(xhr, ajaxOptions, thrownError){
             alert(xhr.status);
             alert(thrownError);
             document.getElementById("notas").innerHTML = "ERRO";
         }
      });
  }
  </code></pre>
  
  <p>I tested the variable <code>v1</code> and the value that it receives necessary, and in my JSP page, I do this:</p>
  
  <pre><code>String turmaSelecionada = request.getParameter("turma");
  </code></pre>
  
  <p>the problem is that the ajax content that does not feed into the div need, beyond what the <code>xhr.status</code> presents thrownError and a 404 error not found</p>
  
  <p>Can anyone help me?</p>