title: How to get password from HTTP basic authentication
body: <p>I'm using HTTP BASIC Authentication with Java.</p>
  
  <p>My Servlet sends a JMS message but I need to supply the user and password to authenticate myself while creating the connection:</p>
  
  <pre><code>javax.jms.ConnectionFactory.createConnection(String username, String password)
  </code></pre>
  
  <p>I can retrieve the username from HttpServletRequest.getUserPrincipal().  But there seems to be no way to retrieve the password. How do I solve this?</p>