<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ page contentType="text/html;charset=windows-1252"%>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>
      Jsp Struts Authentication Testcase
    </title>
    <link href="css/jdeveloper.css" rel="stylesheet" media="screen"/>
  </head>
  <body>
    <h1>
      Struts Jsp Authentication Testcase
    </h1><table cellspacing="2" cellpadding="3" border="1" width="70%">
      <tbody>
        <tr>
          <th align="left" width="46%" bgcolor="#94b5ff">
            <font color="#ff0000">
               Username
            </font>
          </th>
          <td width="54%" align="center" bgcolor="#94b5ff">
            <strong></strong></td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#f7ffd6">
            --- Remote User
          </th>
          <td width="54%" align="center" bgcolor="#f7ffd6">
           <strong><%=request.getUserPrincipal().getName()%></strong>
          </td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#94b5ff">
            <font color="#ff0000">
              Roles
            </font>
          </th>
          <td width="54%" align="center" bgcolor="#94b5ff">
            <strong> </strong></td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#f7ffd6">
            --- Administrator
          </th>
          <td width="54%" align="center" bgcolor="#f7ffd6">
            <strong>
              <%= request.isUserInRole("Administrator")%>
              </strong>
          </td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#f7ffd6">
            --- Manager
          </th>
          <td width="54%" align="center" bgcolor="#f7ffd6">
            <strong>
              <%= request.isUserInRole("Manager")%>
            </strong>
          </td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#f7ffd6">
            --- User
          </th>
          <td width="54%" align="center" bgcolor="#f7ffd6">
            <strong>
              <%= request.isUserInRole("User")%>
            </strong>
          </td>
        </tr>
        <tr>
          <th align="left" width="46%" bgcolor="#f7ffd6">--- Content Owner</th>
          <td width="54%" align="center" bgcolor="#f7ffd6">
            <strong>
              <%= request.isUserInRole("Content Owner")%>
            </strong>
          </td>
        </tr>
      </tbody>
    </table>
  </body>
</html>