You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jorge Vásquez <jv...@3eyegroup.com> on 2006/07/21 17:10:12 UTC

2 clicks required for authentication..

Hi,

I have an authentication page which is requiring me to press twice over the
authenticate button (The first time I perceive that a submit is done but the
login page reloads and the second time the submit is again done but this
time the page that follows as defined by the navigation rule in the
faces-config.xml loads).  I have set the messages tag in order to check out
if there were any messages and nothing appears on screen and neither on
tomcat´s logs.

The login.jsp is the following:  (The only thing that isn´t normal here is
the use of a new tag that I created for internationalized messages:
<a:internationalizedText>, I kind of intuitively imagine that my error has
something to do with this but I see no errors?)  

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

 

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

<%@ taglib uri="http://alerotech.com/jsf/html" prefix="a"%>

<f:view>

      <html>

      <head>

      <meta http-equiv="expires" content="Thu, 27 Jun 2002 10:56:57 GMT">

      <meta http-equiv="cache-control" content="no-cache">

      <link rel="stylesheet"

            href="<%=request.getContextPath()%>/pages/css/alero.css"

            type="text/css">

      <title>Alero WebTop Logon</title>

      </head>

 

      <body leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0"

            topmargin="0" bgcolor="#FFFFFF" text="#000000">

 

      <!-- Top Dressing -->

      <table cellspacing="0" cellpadding="0" width="102%" border="0">

            <tbody>

                  <tr valign="middle">

                        <td bgcolor="#1861bd" align="left" width="412"
height="40"

                             valign="middle">&nbsp;</td>

                        <td bgcolor="#1861bd" align="right"
width="327"></td>

                        <td bgcolor="#1861bd" width="21">&nbsp;</td>

                  </tr>

                  <tr>

                        <td width="412" bgcolor="#ffffff" height="1"
align="center"></td>

                  </tr>

            </tbody>

      </table>

 

      <table cellspacing="0" cellpadding="0" width="102%" border="0">

            <tbody>

                  <tr>

                        <td width="100%" bgcolor="#1869DE" valign="middle"
height="16"></td>

                  </tr>

            </tbody>

      </table>

 

      <table align="center">

            <tr>

                  <td align="center"><!-- Left input panel -->

                  <table width="800" border="0" cellspacing="0"
cellpadding="0">

                        <tr>

                             <td width="235" valign="top">

                             <table width="100%" border="0" cellspacing="0"
cellpadding="20">

                                   <tr>

                                         <td>

                                         <table width="100%" border="0"
cellspacing="0" cellpadding="0"

                                               class="login">

                                               <tr>

                                                     <td bgcolor="#CFCFCF">

                                                     <table width="100%"
border="0" cellspacing="1" cellpadding="0">

                                                           <h:form
id="logonForm">

                                                                 <tr>

                                                                       <td
bgcolor="#FFFFFF">

 
<table width="100%" border="0" cellspacing="0"

 
cellpadding="0">

 
<tr>

 
<td>

 
<h:messages errorClass="errorMessage" globalOnly="false" showDetail="true"
lang="en"/> 

 
</td>

 
</tr>

 
<tr>

 

 
<td

 
background="<%=request.getContextPath()%>/pages/images/logon/td_header.gif"

 
height="21">&nbsp;&nbsp; <strong> <a:internationalizedText

 
textId="Login" groupId="logon"/> </strong></td>

 
<td width="12"

 
background="<%=request.getContextPath()%>/pages/images/logon/td_header.gif""
>

 
<img

 
src="<%=request.getContextPath()%>/pages/images/logon/icn_lock.gif"

 
width="12" height="15" />&nbsp;</td>

 
</tr>

 
</table>

                                                                       </td>

                                                                 </tr>

 

                                                                 <tr>

                                                                       <td
bgcolor="#E9EAEC">

 
<table width="100%" border="0" cellspacing="10"

 
cellpadding="1">

 
<tr>

 
<td><strong> <a:internationalizedText textId="User ID" groupId="logon"/>

 
<h:inputText id="userId"

 
value="#{authenticationBean.userId}" required="true" /> <h:message

 
id="userIdError" for="userId" errorClass="errorMessage" />

 
</strong></td>

 
</tr>

 
<tr>

 
<td style="color: red;"></td>

 
</tr>

 
<tr>

 
<td><strong> <a:internationalizedText textId="Password" groupId="logon"/>

 
</strong> <h:inputSecret id="password"

 
value="#{authenticationBean.password}" /> <h:message

 
id="passwordError" for="password"

 
errorClass="errorMessage" /></td>

 
</tr>

 
<tr>

 
<td style="color: red;"></td>

 
</tr>

 
<tr>

 
<td><strong> <a:internationalizedText textId="Server" groupId="logon"/>
</strong>

 
<h:inputText id="serverAddress"

 
value="#{authenticationBean.serverAddress}"

 
required="true" /> <h:message id="serverAddressError"

 
for="serverAddress" errorClass="errorMessage" /></td>

 
</tr>

 
<tr>

 
<td style="color: red;"></td>

 
</tr>

 
<tr>

 
<td><strong> <a:internationalizedText textId="Server Port" groupId="logon"/>

 
</strong> <h:inputText id="serverPort"

 
value="#{authenticationBean.serverPort}" required="true" />

 
<h:message id="serverPortError" for="serverPort"

 
errorClass="errorMessage" /></td>

 
</tr>

 
<tr>

 
<td style="color: red;"></td>

 
</tr>

 
<tr>

 
<td>

 
<h:commandButton action="#{authenticationBean.authenticate}"
image="/pages/images/logon/btn_login.gif" styleClass="border:0px"/>

 
</td>

 
</tr>

 
</table>

                                                                       </td>

                                                                 </tr>

 

                                                                 <!--
Language Selection -->

                                                                 <tr>

                                                                       <td
bgcolor="#F5F7F9">

 
<table width="100%" border="0" cellspacing="10"

 
cellpadding="1">

 
<tr>

 
<td><strong> <a:internationalizedText

 
textId="Select Language" groupId="logon"/> </strong></td>

 
</tr>

 
<tr>

 
<td><strong> <h:selectOneMenu id="languages"

 
value="#{messagesBean.languageId}" immediate="true"

 
onchange="submit()"

 
valueChangeListener="#{messagesBean.languageSelected}">

 
<f:selectItems value="#{messagesBean.languages}" />

 
</h:selectOneMenu> </strong></td>

 
</tr>

 
</table>

                                                                       </td>

                                                                 </tr>

                                                           </h:form>

                                                     </table>

                                                     </td>

                                               </tr>

                                         </table>

                                         <br />

                                         <table width="100%" border="0"
cellspacing="0" cellpadding="0"

                                               class="login">

                                               <tr>

                                                     <td width="22"
valign="top"><img

 
src="<%=request.getContextPath()%>/pages/images/logon/btn_i.gif"

                                                           width="12"
height="12" /></td>

                                                     <td
width="193"><strong><a href="#"> <a:internationalizedText

                                                           textId="Help"
groupId="logon"/> </a></strong></td>

                                               </tr>

                                         </table>

                                         <br />

                                         </td>

                                   </tr>

                             </table>

                             </td>

 

                             <!-- Right side -->

                             <td valign="middle" align="center">

 

                             <h1><a:internationalizedText textId="User
WebTop" groupId="logon"/></h1>

                             <br>

                             <br>

                             <br>

                             <img
src="<%=request.getContextPath()%>/pages/images/logo.JPG" /> <br>

                             <br>

                             <br>

                             <br>

                             <br>

                             <br>

                             <span class="foot">&nbsp;&nbsp;&nbsp;&copy;2005
Alero Technologies.

                             All Rights Reserved.&nbsp;&nbsp;&nbsp;</span>
<br>

                             <br>

                             <br>

                             </td>

                        </tr>

 

                  </table>

 

 

                  </td>

            </tr>

      </table>

 

 

      <br>

 

 

      </body>

      </html>

</f:view>

 

Regards,

 

JV