Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8313641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:33:27+00:00 2026-06-08T20:33:27+00:00

I am using jsf 2.0 with primefaces. In my application i have login page

  • 0

I am using jsf 2.0 with primefaces. In my application i have login page ,and i have include this login all the pages and it display on primefaces lightbox(inline method)… it is working fine in all the browsers except opera… But in opera when i click the login button it is not getting validated as well as the form also not submitted …

My index.xhtml

<h:body style="background:url(images/index_bg.jpg) repeat-x;">
       <!--Header-->    
  <ui:include src="/webheader.xhtml"></ui:include>
  <!--End Header-->     
 <!--Menu-->  
  <ui:include src="/webmenu.xhtml"></ui:include>
  .............
  </h:body>

webheader.xhtml

  ..............
 <p:lightBox style="display:inline;" width="1010px">  <h:outputLink     
   value="Registration.xhtml">Register</h:outputLink> </p:lightBox>|
   <p:lightBox style="display:inline;" width="810px" group="false">
   <h:outputLink value="#">  
    <h:outputText value="Login"/>  
</h:outputLink>   
<f:facet name="inline">
<ui:include src="login.xhtml"></ui:include>
</f:facet>
 </p:lightBox>
...........................

my login.xhtml

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.prime.com.tr/ui">
     <h:head>
    <script type="text/javascript">  
        function resetval() {
            document.getElementById("loginid:log_pass_input").value = null;

            document.getElementById("loginid:log_pass_input").focus();
        }
    </script>
    </h:head>
      <h:body>
    <f:view>

        <!-- Login -->
        <div class="login">
            <h:form id="ajxstaform">
                <p:ajaxStatus style="width:16px;height:16px;"  
    id="ajaxStatusPanel">
                    <f:facet name="start">
                        <h:graphicImage value="../images/ajax-
     loader.gif" />


                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value="" />
                    </f:facet>
                </p:ajaxStatus>
            </h:form>

            <div class="loginInner">
                <table width="90%" border="0" cellspacing="0" \
     cellpadding="0">

                    <tr>
                        <td><h1>Login</h1>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div class="loginTEXT">
                                <table width="80%" 
     border="0" align="center" cellpadding="0"
                                    cellspacing="0" 
    id="loginPanel">
                                    <tr>
            <td>&nbsp;
  </td>
        <td>&nbsp;
  </td>
                                    </tr>

     <h:form id="loginid">  <tr>
                                                     <td width="34%" align="center"><p>Email Id</p>
                                                  </td>
                                                    <td width="66%" align="center"><h:inputText
                                                    value="#{loginBean.email_id}" id="log_email"
                                                    binding="#{login}" required="true"
                                                    requiredMessage="Enter the Email ID" immediate="true"
                                                    validatorMessage="Invalid Email ID">
                                                    <p:ajax event="blur" update="msg1" />
                                                    <f:validateRegex
                                                        pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
                                                </h:inputText></td>
                                            <td width="100%" align="center"><h:message
                                                    for="log_email" id="msg1" styleClass="alert" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center"><p>Password</p>
                                            </td>
       <td align="center"><p:password
                                                    value="#{emailBean.password}" id="log_pass"
                                                    feedback="false" required="true"
                                                    requiredMessage="Enter the Password" immediate="true">
                                                    <p:ajax event="blur" update="msg2" />
                                                    <f:validator validatorId="loginValidator" />
                                                    <f:attribute name="login" value="#{login.value}" />
                                                </p:password></td>
                                            <td align="center"><h:message for="log_pass" id="msg2"
                                                    styleClass="alert" /></td>
        </tr>
        <tr>
                                            <td colspan="2" align="center">
                                                <div>
        <p:commandButton value="Login"
                                                        action="#{commonControl.loginCtrl}"
                                                        update="ajxstaform:ajaxStatusPanel,loginid,msg1,msg2"
                                                        oncomplete="resetval()">
                                                    </p:commandButton>
                                            </div></td>
                                        </tr>
                                    </h:form>

                                    <tr>
                                        <td colspan="2" align="center"><p:spacer height="20px"
                                                width="27px"></p:spacer> <h:form>
                                                <h:commandLink
                                                    action="#{registrationControl.forgotpasswordredirect}">
                                                    <b>Forgot Password</b>
                                                </h:commandLink>
                                            </h:form> <!--   <a href="PasswordReset.xhtml" title="Forgot password">Forgot Password</a> -->
                                        </td>
                                    </tr>
                                </table>
                            </div></td>
                    </tr>
                </table>


            </div>

        </div>

    </f:view>
    <!--End Login -->
</h:body>
</html>

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:33:30+00:00Added an answer on June 8, 2026 at 8:33 pm

    You’ve there invalid HTML syntax. A <table> element cannot have a <form> as direct child, but only <thead>, <tbody>, <tfoot> and/or <tr>. The browser behaviour is unspecified in case of invalid HTML. Whilst most browsers are forgiving and leinient on this kind of developer mistakes and attempts to auto-correct it, the Opera browser is known to be extremely strict on this.

    Rearrange the JSF <h:form id="loginid"> component accordingly so that your code ultimately generates valid HTML. You can put the <h:form> around the <table> or inside the <td>, but certainly not somewhere in between them. You could achieve this by just putting the entire table in a single form and get rid of the nested <h:form> for the “forgot password” link by making it a normal <h:link>, or a non-validating action by adding immediate="true", or an ajax action by <f:ajax> or <p:commandLink>.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JSF 2.0 and primefaces. I have one page with several inputs inside
I have an application developed using Primefaces 2.2.1 and JSF 2.0, deployed on Glassfish
I'm using JSF 2 and PrimeFaces 2.1 on GlassFish. I have a page that
I have a JSF+Primefaces 3.2 application. I am using p:rowExpansion within a p:dataTable. In
I am writing a JSF 2.0 Mojarra application using Primefaces 3.3.1 on Tomcat 6.
I'm using this jQuery snippet to create tooltips on some JSF primefaces elements in
I am developing a Java web application using Hibernate and JSF/primefaces. am sometimes getting
i am writing a web application with jsf 2.0 and using primefaces framework. i
I have a problem using JSF 2.0, PrimeFaces and the tuckey.org UrlRewriteFilter. The problem
I am using JSF 2.0 and PrimeFaces. I have a selectOneMenu and a selectManyCheckbox.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.