<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
          xmlns:c="http://java.sun.com/jsp/jstl/core"
          xmlns:fmt="http://java.sun.com/jsp/jstl/fmt">
  <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
              doctype-system="http://www.w3.org/TR/html4/loose.dtd"
              doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
  <jsp:directive.page contentType="text/html"/>
  <html>
    <head>
      <meta http-equiv="Content-Type"
            content="text/html; charset=windows-1252"/>
      <fmt:setBundle basename="oracle.srdemo.view.resources.UIResources"/>
      <title>
        <fmt:message key="srdemo.login"/>
      </title>
    </head>
    <body>
      <!-- Note: normally we would let the underlying provider e.g. OID
           handle check for the number of attempts. This is for convenience
           in the demo only so don't copy blindly in an enterprise App-->
      <c:choose>
        <c:when test="${sessionScope.loginAttempts == null}">
          <c:set  var="loginAttempts" scope="session" value="0"/>
        </c:when>
        <c:when test="${sessionScope.loginAttempts > 2}">
          <img height="69" width="340"
               src="/SRDemoADFBC/faces/images/SRBranding.gif"
               alt="SRDemo Logo"/>
          <hr/>
          <h2>
            <fmt:message key="srdemo.tooManyAttempts"/>
          </h2>
          <hr/>
          <c:set var="stop" scope="page" value="${true}"/>
        </c:when>
        <c:when test="${sessionScope.loginAttempts != null}">
          <c:set var="loginAttempts" scope="session"
                 value="${sessionScope.loginAttempts + 1}"/>
        </c:when>
      </c:choose><c:if test="${!stop}">
        <form action="j_security_check" method="post">
          <table cellspacing="3" cellpadding="2" border="0" width="100%">
            <tr>
              <td colspan="3">
                <img height="69" width="340"
                     src="/SRDemoADFBC/faces/images/SRBranding.gif"
                     alt="SRDemo Logo"/>
                <hr/>
              </td>
            </tr>
            <tr>
              <td colspan="3">
                <h1>
                  <fmt:message key="srlogin.pageTitle"/>
                </h1>
              </td>
            </tr>
            <tr>
              <td colspan="3">
                <c:if test="${sessionScope.loginAttempts >0}">
                  <h3><fmt:message key="srdemo.badLogin"/></h3>
                </c:if>
              </td>            
            </tr>
            <tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
              <td rowspan="7">
                <table border="1" cellpadding="5">
                  <tr>
                    <td>
                      <fmt:message key="srlogin.info"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
            </tr>
            <tr>
              <td width="120">
                <b style="whitespace:nowrap"><fmt:message key="srlogin.username"/></b>
              </td>
              <td>
                <input type="text" name="j_username"/>
              </td>
            </tr>
            <tr>
              <td width="120">
                <b><fmt:message key="srlogin.password"/></b>
              </td>
              <td>
                <input type="password" name="j_password"/>
              </td>
            </tr>
            <tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
              <td>
                <input type="submit" name="logon" value="Sign On"/>
              </td>
            </tr>
            <tr>
            </tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>            
            <tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
            </tr>
            <tr>
              <td><jsp:text><![CDATA[&nbsp;]]></jsp:text></td>
            </tr>
            <tr>
              <td colspan="3">
                <hr/>
              </td>
            </tr>
          </table>
        </form>
      </c:if></body>
  </html>
</jsp:root>
