title: why am I getting "Error 403: AuthorizationFailed" in this simple WebSphere example web.xml?
body: <p>I'm using WebSphere 7.  I have a simple example set up with web.xml as shown below.</p>
  
  <p>This is how I test it:</p>
  
  <ol>
  <li><p>I start with no user and no group in WebSphere</p></li>
  <li><p>I try to access the page (/restricted/topsecret.html) I'm prompted to log in.  I cannot.</p></li>
  <li><p>I add a user/password "rob/password" using the WebSphere admin console.  I can now log in, but I cannot see the page.  I get a "403: AuthorizationFailed" error.</p></li>
  <li><p>I add a group called "ROLE1" and I assign that group to user "rob" using the WebSphere admin console.  I restart firefox, I can still log in but I still get the "403" error.</p></li>
  <li><p>I wrote a little JSP (below) to output the logged in username, but even after logging the username is still null.</p></li>
  </ol>
  
  <p>Any idea what I'm doing wrong??  Thanks!</p>
  
  <p>Rob</p>
  
  <pre><code>&lt;security-constraint&gt;
    &lt;web-resource-collection&gt;
      &lt;web-resource-name&gt;page test 1&lt;/web-resource-name&gt;
      &lt;url-pattern&gt;/restricted/topsecret.html&lt;/url-pattern&gt;
      &lt;http-method&gt;GET&lt;/http-method&gt;
      &lt;http-method&gt;POST&lt;/http-method&gt;
    &lt;/web-resource-collection&gt;
    &lt;auth-constraint&gt;
      &lt;role-name&gt;ROLE1&lt;/role-name&gt;
    &lt;/auth-constraint&gt;
    &lt;user-data-constraint&gt;
      &lt;transport-guarantee&gt;NONE&lt;/transport-guarantee&gt;
    &lt;/user-data-constraint&gt;
  &lt;/security-constraint&gt;
  </code></pre>
  
  <p>usertest.jsp</p>
  
  <pre><code>&lt;%@ page session="true" %&gt;
  Logged in username = '&lt;%= request.getRemoteUser() %&gt;' // is always null
  &lt;p/&gt;
  Logged in username = '&lt;%= request.getUserPrincipal() %&gt;' // is always null
  </code></pre>