jQuery.get(servlet url) should activate Java servlet?

jQuery.get(servlet url) should activate Java servlet?

I am trying to develop a web program that uses ajax with AppEngine.

in HTML <head> part,  I put...

<script type="text/javascript">//<![CDATA[


  function asyn() {


    $.get("http://localhost:8888/ajaxtestforpictures");

  }



//]]</script>


and the java servlet is only...


public class AjaxTestForPicturesServlet extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)

throws IOException {

resp.sendRedirect("redirected.html");

}

}


the URL of the servlet (/ajaxtestforpictures) is fine.

 I am hoping that clicking the button would activate the servlet and redirect to redirected.html.  But it does not work.  I have recently started using jQuery.ajax, so could anyone help me out to find the problem?