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 8968201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:24:59+00:00 2026-06-15T17:24:59+00:00

I am using PrimeFaces 3.4 in my web app and for a particular page

  • 0

I am using PrimeFaces 3.4 in my web app and for a particular page the controls are not displayed with the normal PrimeFaces skin:

<!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/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">
<h:head>
    <title>VMS login</title>
</h:head> 
<h:body> 
  <h:form id="loginForm">
    <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />  
    <p:panel header="#{msgs['login.title']}">
      <p:panelGrid id="loginPanel" columns="2">
        <h:outputText value="#{msgs['login.username']}" />
        <p:inputText id="j_username" value="#{loginFormBean.userName}" required="true"></p:inputText>
        <p:message for="j_username" ></p:message>
        <h:outputText value="#{msgs['login.password']}" />
        <p:password id="j_password" value="#{loginFormBean.password}" required="true" feedback="false"></p:password>
        <p:message for="j_password"></p:message>
        <p:commandButton action="#{loginController.loginUsingSpringAuthenticationManager}" value="#{msgs['login.button']}" update="loginForm" ajax="true"></p:commandButton>
      </p:panelGrid>
    </p:panel>
  </h:form>
</h:body>
</html>

This outputs to:

enter image description here

The panel should have a header and so on.

The interesting thing is that in another page where I am using a <p:layout> with different panels in the layouts they display fine with their normal PrimeFaces look-and-feel.

What am I doing wrong? Thank you

  • 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-15T17:25:01+00:00Added an answer on June 15, 2026 at 5:25 pm

    Given that it only occurs on the login page, that can happen when the authentication mechanism also kicks on requests to JSF resources like CSS/JS/image files and redirects them to the login page as well. The webbrowser would then retrieve the HTML representation of the login page instead of the concrete resources. If you have investigated the HTTP traffic in the webbrowser’s developer toolset, then you should have noticed that as well.

    If you’re using homegrown authentication with a servlet filter, then you need to tell the filter to not redirect them to the login page, but just continue them. It are those /javax.faces.resource/* URLs (you can get that URL path as constant by ResourceHandler#RESOURCE_IDENTIFIER).

    if (request.getRequestURI().startsWith(request.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) {
        chain.doFilter(request, response);
        return;
    }
    
    // ...
    

    Or if you’re using container managed authentication, then you should add /javax.faces.resource/* to allowed URLs which should be skipped from login checks:

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Allowed resources</web-resource-name>
            <url-pattern>/javax.faces.resource/*</url-pattern>
        </web-resource-collection>
        <!-- No Auth Contraint! -->
    </security-constraint>
    

    See also Exclude css & image resources in web.xml Security Constraint.

    Or when you’re using 3rd party authentication framework like Spring Security, then you need to tell it the following way (assuming 3.1.0 or newer)

    <http security="none" pattern="/javax.faces.resource/**" />
    

    See also Spring Security 3.0.5.

    Or when you’re using PicketLink, see PrimeFaces based application with PicketLink does not show style in login page.

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

Sidebar

Related Questions

I'm developing a web app using JSF 2.0 + PrimeFaces 2.2.1 Now I think
I have a web app using JSF(Primefaces), JPA(Hibernate) and EJBs and have trouble to
I am trying to build simple web app using primefaces 3.0.M2 version. I am
I am starting a web app project using JSF 2.0 and PrimeFaces. One of
I recently migrated my JSF app(using primefaces) from glassfish 3.1 to tomcat7 server. Previously
I'm using JSF templates and Primefaces. Javascript code does not seem to be working
i am using primefaces library this is my jsp page source: <%@taglib uri=http://primefaces.prime.com.tr/ui prefix=p%>
I am new to Eclipse. Currently developing a sample web application using primefaces 3.1
I am using JSF and Primefaces in my web application. In this i am
In my JSF 2 - Primefaces 3 web application, I am using <p:panelGrid> and

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.