title: Handling response.redirect errors in JSP page
body: <p>i have a condition where an URL is manipulated or changed wantedly. i have to catch the error and move to error page. but the error page is never called. </p>
  
  <p>I am using response.sendRedirect("MyURL"); in the jsp page. If the URL is correct its working fine. </p>
  
  <p>If i manipulate the URL and use the command it shows HTTP 404 error in the same page but not calling the error page </p>
  
  <p>here is my code. </p>
  
  <pre><code>one.jsp  
  ---------  
  &lt;%@ page errorPage="exceptionHandler.jsp" %&gt;  
  &lt;%
  
  String webBrowserURL="http://URL"  
  
  response.sendRedirect(webBrowserURL);  
  
  %&gt;  
  
  
  exceptionHandler.jsp  
  ------------------------  
  
  &lt;%@ page isErrorPage="true" %&gt;  
  &lt;% String root = request.getContextPath(); %&gt;  
  
                  &lt;%  
                           //get the correct url form the database and send it to the page  
                  %&gt;  
  
  
  &lt;jsp:forward page="one.jsp" /&gt;  
  </code></pre>
  
  <p>Help me</p>