<%-- 
/**
  * Copyright (c) 2004 Red Hat, Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  * USA
  *
  * Component of: Red Hat Application Server
  * 
  * Initial Developers: Aizaz Ahmed
  *                     Vivek Lakshmanan
  *                     Andrew Overholt
  *                     Matthew Wringe
  *
  */
--%>
<%@ page contentType="text/html" %>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>

	<%@ page contentType="text/html"
		 import="olstore.entity.*"
         import="olstore.framework.EJBHomeFactory"%>
	<%
	   EJBHomeFactory factory = EJBHomeFactory.getInstance();
       UserLocalHome userHome = (UserLocalHome) factory.getLocalHome (EJBHomeFactory.USER);
       if ((userHome.findAll()).isEmpty()){
       		response.sendRedirect ( "/olstore/populate/populateNotice.jsp" );
       }
     %>

    <jsp:include page="/nav/loginHeader.jsp" >
        <jsp:param name="page_title" value="Please login to access the store" />
    </jsp:include>

    <!-- Content begins here -->
    <div class="loginView">
        <div class="ImageAdj">
         <html:form action="signin" focus="username">	    
              <table >
                  <tr> <td colspan="2"> <p class="label"> Login   </p> </td> </tr>
                  <tr>
                    <td>
                        <p class = "shortDesc"> User name: </p>
                    </td>
                    <td> 
                        <p class = "shortDesc">  <html:text property="username"/> </p> 
                    </td>
                 </tr>

                 <tr>
                    	<td>
                        	<p class = "shortDesc"> Password: </p>
                    	</td>
                	<td> 
                        	<p class = "shortDesc"> <html:password property="password"/> </p>  
                    	</td>
                 </tr>
                 <tr>
                     <td align="left">  <p class = "shortDesc"> <html:submit value="Log In"/>  </p> </td>
                     <td align="right"> <p class = "shortDesc"> <html:reset/> </p>  </td> 
                 </tr>
             </table>
           	 <html:link action="/general/CreateUser.do">[Register a new User]</html:link>

         </html:form>
      </div>
    </div>

    <jsp:include page="/nav/Footer.jsp" />

