title: JSP Ajax Post to another JSP Page
body: <p>I have the following in a jsp page;</p>
  
  <pre><code>&lt;script language="javascript"&gt;
      function ClickMe_Click(){
          $.ajax({
              type: "post",
              url: "dimensionList.jsp",
              data: "dimensionName=Slappy",
              success: function(msg) {
                  alert(msg);
              }
              error: function(request,error){
                  alert(error);
              }
          });
          return false;
      }
  &lt;/script&gt;
  &lt;a href="." onclick="return ClickMe_Click() ;"&gt;Click Me&lt;/a&gt;
  </code></pre>
  
  <p>In my <strong>dimensionList.jsp</strong> I have;</p>
  
  <pre><code>&lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;%
      out.print("it works!");
  %&gt;
  </code></pre>
  
  <p>I am getting an error but when I alert out error I get <strong>error</strong> which is less than helpful.</p>