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

  • Home
  • SEARCH
  • 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 8917353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:27:48+00:00 2026-06-15T05:27:48+00:00

I am testing the PrimeFaces example avaible at https://www.primefaces.org/showcase/ui/overlay/dialog/loginDemo.xhtml . I correctly imported PrimeFaces

  • 0

I am testing the PrimeFaces example avaible at https://www.primefaces.org/showcase/ui/overlay/dialog/loginDemo.xhtml . I correctly imported PrimeFaces and JSF 2.1 in Eclipse Dyamic web project, but I get the following error while starting the webpage (with Tomcat):

javax.faces.view.facelets.TagException: /login.xhtml at line 30 and column 36 <f:facet> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: facet
        org.apache.myfaces.view.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:282)
        org.apache.myfaces.view.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:250)
        com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
        com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:745)
        com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
        com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
        com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
        com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
        com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
        com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
        com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
        com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
        javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
        org.apache.myfaces.view.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:739)
        org.apache.myfaces.view.facelets.compiler.Compiler.compile(Compiler.java:128)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory._createFacelet(DefaultFaceletFactory.java:300)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.access$000(DefaultFaceletFactory.java:53)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:114)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:111)
        org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getFacelet(FaceletCacheImpl.java:83)
        org.apache.myfaces.view.facelets.impl.FaceletCacheImpl.getFacelet(FaceletCacheImpl.java:50)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:199)
        org.apache.myfaces.view.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:182)
        org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage._getFacelet(FaceletViewDeclarationLanguage.java:2622)
        org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:452)
        org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:78)
        org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241)
        javax.faces.webapp.FacesServlet.service(FacesServlet.java:199)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.21 logs.

The LoginBean.java contains:

package classi;
import java.awt.event.ActionEvent;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import org.primefaces.context.RequestContext;
public class LoginBean
{
    private String username;  

    private String password;  

    public String getUsername() {  
        return username;  
    }  

    public void setUsername(String username) {  
        this.username = username;  
    }  

    public String getPassword() {  
        return password;  
    }  

    public void setPassword(String password) {  
        this.password = password;  
    }  

    public void login(ActionEvent actionEvent) {  
        RequestContext context = RequestContext.getCurrentInstance();  
        FacesMessage msg = null;  
        boolean loggedIn = false;  

        if(username != null  &&/*&&*/ username.equals("admin") && password != null  && password.equals("admin")) {  
            loggedIn = true;  
            msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Welcome", username);  
        } else {  
            loggedIn = false;  
            msg = new FacesMessage(FacesMessage.SEVERITY_WARN, "Login Error", "Invalid credentials");  
        }  

        FacesContext.getCurrentInstance().addMessage(null, msg);  
        context.addCallbackParam("loggedIn", loggedIn);  
    }  
}

login.xhtml contains:

<?xml version="1.0" encoding="UTF-8" ?>
<!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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
</head>
<body>
<h:outputLink id="loginLink" value="javascript:void(0)" onclick="dlg.show()" title="login">     
    <p:graphicImage value="/images/login.png" />  
</h:outputLink>  

<p:growl id="growl" showDetail="true" life="3000" />  

<p:dialog id="dialog" header="Login" widgetVar="dlg">  
    <h:form>  

        <h:panelGrid columns="2" cellpadding="5">  
            <h:outputLabel for="username" value="Username:" />  
            <p:inputText value="#{loginBean.username}"   
                    id="username" required="true" label="username" />  

            <h:outputLabel for="password" value="Password:" />  
            <h:inputSecret value="#{loginBean.password}"   
                    id="password" required="true" label="password" />  

            <f:facet name="footer">  
                <p:commandButton id="loginButton" value="Login" update=":growl"   
                    actionListener="#{loginBean.login}"   
                    oncomplete="handleLoginRequest(xhr, status, args)"/>  
            </f:facet>

        </h:panelGrid>  

    </h:form>  
</p:dialog>  

<script type="text/javascript">  
    function handleLoginRequest(xhr, status, args) {  
        if(args.validationFailed || !args.loggedIn) {  
            jQuery('#dialog').effect("shake", { times:3 }, 100);  
        } else {  
            dlg.hide();  
            jQuery('#loginLink').fadeOut();  
        }  
    }  
</script>  
</body>
</html>
  • 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-15T05:27:49+00:00Added an answer on June 15, 2026 at 5:27 am

    Try to change xmlns:f="http://java.sun.com/jsf/html" to xmlns:f="http://java.sun.com/jsf/core">

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

Sidebar

Related Questions

I am testing the PrimeFaces example avaible at http://www.primefaces.org/showcase/ui/dialogLogin.jsf . I correctly imported PrimeFaces
Im just testing out JSF 2 with Primefaces and are setting up a basic
I have a (JSF 2.0/ Primefaces 2.2RC-SNAPSHOT) app that has <p:layout> I use a
Testing the Javascript Implementation of MD5 here: http://www.webtoolkit.info/javascript-md5.html gives the following output: MD5(muzaaya) =
While testing my site (www.luchtspin.nl) with the Utilu IE Collection (IE6-8 - http://utilu.com/IECollection )
I am studying primefaces themes on Primefaces user guide. https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/primefaces/primefaces_users_guide_3_3.pdf At pag. 457 you
testing Play framework and JPA. I eclipsify my very simple test application. Import the
Testing.BSMain, Text: Start Page I would like to substring the value above and returning
Testing out someone elses code, I noticed a few JSP pages printing funky non-ASCII
Testing UI is difficult. What do you think is the best unit testing framework

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.