2
votes

I want to use Bootsfaces for JSF, I was checking their website and I follow the steps to start working with it but when I run my app the CSS it´s not loading.

My project is on Maven also.

  1. I download the JAR from their website.
  2. I load that JAR to my project
  3. I put the code from the example

But the css is not working, any idea, has anyone worked with this before?

2
check your javascript console for resource loading errorskolossus
I've answered a similar question here: stackoverflow.com/questions/24666018/…Stephan Rauh

2 Answers

1
votes

I'm starting on bootfaces too. For me, it seems to be best designed face for JSF.

About your problem, did you inserted the xmlns line on the HTML tag? This one:

xmlns:b="http://bootsfaces.net/ui"

Your HTML tag should look like this:

<html
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:b="http://bootsfaces.net/ui"
    xmlns:f="http://xmlns.jcp.org/jsf/core">

I hope it helps you!

-1
votes

I used to have this problem.

First, check that web.xml is similar to:

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<!-- Welcome page -->
<welcome-file-list>
    <welcome-file>faces/welcome.xhtml</welcome-file>
</welcome-file-list>

<!-- Map these files with JSF -->
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/javax.faces.resource/*</url-pattern>
</servlet-mapping>

</web-app>

Second, did you use commands clean, compile, install already? If not please run them.