title: response .sendRedirect not working
body: <p>I have an application where i have to redirect  from a login page to another page the user name and the password i enter in the login page is going to another servlet.so from the servlet if i found the login values are matched i will redirect to another page,But this things are not working....I am posting my code </p>
  
  <pre><code>  boolean validationFlag = qb.userValidation(loginVO);
          if (validationFlag) {
  
              //This is for Ajax return 
  
              System.out.println("we are here");
              response.sendRedirect("../main.jsp");
              System.out.println("we are back");
          }
      } catch (Exception e) {
  
          e.printStackTrace();
      }
  } 
  </code></pre>
  
  <p>here validationFlag is true and i have to redirect to anther page but it is not working</p>