title: Can sendRedirect() act as a post method instead of get? - jsp/servlets
body: <p>I have a simple form which accepts a username and a password. I have to use <code>sendRedirect()</code> method for the page to redirect to one page if log in is valid and to another if not. I need to use <code>sendRedirect()</code> and not <code>forward()</code> since the other pages are located in another server. I noticed that when using</p>
  
  <pre><code>response.sendRedirect(response.encodeRedirectURL("FileName.jsp?paramName=" +value));
  </code></pre>
  
  <p>the <code>sendRedirect()</code> is using the <code>GET</code> method since name=value are being shown in the URL. This is not desirable for me since I don't want these values to show in the URL for safety reasons. </p>
  
  <p>Is there a way to <code>POST</code> these values using sendRedirect() ? 
  I tried to do a form with method <code>POST</code> which hides the values I need but still no luck</p>
  
  <p>What can I do please? Thanks :)</p>