title: requestDispatcher.forward and response.redirect not working
body: <p>My web app directory structure is </p>
  
  <pre><code>myApp
   -src
       - filtersPackage(all my filters lie in this package)
       - servletsPackage(all my controllers and models lie in this package)
   - web-content           
     - web
       - views(all my jsp files lie in this dir)
       - js(all my javascript files lie in this dir)
  </code></pre>
  
  <p>In login.jsp, user clicks on FB login button,  inside js/FBAUth.js I collect login details and I send it to my auth.do servlet using jquery ajax POST method.</p>
  
  <p>The SessionFilter allows the request to go to AuthServlet's doPost method. In AuthServlet If the credentials are correct then do the following</p>
  
  <pre><code>url = "dashboard.jsp" 
  request.getSession().setAttribute("uid", id);               
  view = request.getRequestDispatcher(url);
  view.forward(request, response);
  return;
  </code></pre>
  
  <p>I have seen in debug mode that these lines execute but my browser is still stuck on login page. The values for view.requestURI -> /myApp/web/views/dashboard.jsp and 
  view.servletPath -> /web/views/dashboardTmp.jsp.
  I also tried response.sendRedirect(url), but still the browser is stuck on login page. Nothing executes after these lines. </p>
  
  <p>In web.xml, my auth servlet is mapped as follows</p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Auth&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servletsPackage.AuthServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Auth&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/web/views/auth.do&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I also tried calling doGet inside doPost, and executed this code in doGet, but all in vain.
  What am I missing here ?</p>