title: Opening a password-protected website from servlet
body: <p>The scenario is intended user will access the servlet (e.g <a href="http://someip/myservlet" rel="nofollow noreferrer">http://<em>someip</em>/myservlet</a>) which in turn <strong>authenticates</strong> a password protected website (e.g. <a href="http://mysite.com" rel="nofollow noreferrer" title="mysite.com">mysite.com</a> - which is hosted on IIS server with <em>Use Windows authentication</em> enabled) <strong>implicitly and then opens</strong> that <a href="http://mysite.com" rel="nofollow noreferrer" title="mysite.com">mysite.com</a> – so that:</p>
  
  <ol>
  <li>target users will not get prompt for username &amp; password as he will go through the servlet(hosted on some server like tomcat)</li>
  <li>any other user accessing <a href="http://mysite.com" rel="nofollow noreferrer" title="mysite.com">link text</a> will not be able to access without knowing credentials</li>
  </ol>
  
  <p>The requirement is
  (<strong>it has to open that website not fetch the content</strong> as <a href="http://mysite.com" rel="nofollow noreferrer" title="mysite.com">mysite.com</a> has dynamic functionality in it)</p>
  
  <p><strong>Is it possible in Java (HttpURLConnection) ??</strong></p>
  
  <p>any help is appreciated.</p>
  
  <p>Thanks. </p>