I’m trying to call jQuery’s AJAX method in my jsp page(“abcd.jsp”) to load some content into a DIV on a Button click.
I’ve a JSP (“new.jsp”), its URL is mapped to a Servlet(“myservlet.java”) using URL Rewrite.This servlet forwards the request to “abcd.jsp”. Now when the user clicks on the Button in “abcd,jsp”, the click() method gets called but the AJAX method doesn’t work.Both $.get(“myservlet”) & $.post(“myservlet”) fail.
When I remove the URl Rewrite rule, then everything works fine..
Also, when I run this “abcd.jsp” page directly, eveything works OK.Both these method works and displays content send by servlet..
Does these AJAX get & post methods deal with the URL of the page ??
or, Am I doing something wrong ??