title: can't forward to another jsp from servlet invoked by ajax
body: <p>I am calling a servlet using ajax code</p>
  
  <pre><code>$.ajax({
                  url: 'servletName',
                  data: {
                      userID: selectedID
                  },
                  type: 'post'
              });
  </code></pre>
  
  <p>I can print the value inside the servlet
  but I can't forward to another jsp.....
  The servlet code is </p>
  
  <pre><code>id = request.getParameter("userID");
  System.out.println("Selected ID : "+id);
  
  request.setAttribute("newID", id);
  
  RequestDispatcher rd = request.getRequestDispatcher("/newpage.jsp");
  rd.forward(request, response);
  </code></pre>
  
  <p>if I call this servlet from a form submit button, it works.
  but its not forwarding to another JSP from the ajax code.
  is there any different way to do that????
  Can anyone please help</p>