title: HttpServletRequest.getRemoteUser() vs HttpServletRequest.getUserPrincipal().getName()
body: <p>These two seem to be doing the same things. Can anyone explain the main difference between the two?  When would you use one vs the other?  </p>
  
  <p><a href="http://docs.oracle.com/javaee/5/api/javax/servlet/http/HttpServletRequest.html#getRemoteUser%28%29" rel="noreferrer">HttpServletRequest.getRemoteUser()</a></p>
  
  <p><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/security/Principal.html#getName()" rel="noreferrer">HttpServletRequest.getUserPrincipal().getName()</a></p>