I worked with richfaces 4.3 + bootstrap 3 for quite a time now and consider it a successful approach
This is, what I learned:
- jquery version conflict: both ship with jQuery (bootstrap requires a newer version, than richfaces); doublecheck, if you are using the correct jQuery instance, especially with $ alias!
- richfaces skinning should be disables in web.xml
- resources like fonts or icons, that are references from CSS are often declared as relative URL; this does not fit quite well into the JSF resource system (workaround see below)
- JSF resource library support and versioning helps a lot with managing different JS libraries
solution for 1:
create a file static-resource-mappings.properties with this line
jquery.js=org.richfaces.staticResource/jquery-1.10.2.js
jquery-migrate.js=org.richfaces.staticResource/jquery-migrate-1.2.1.js
in xhtml, use the resource shortcut:
<h:outputScript name="jquery.js"/>
check this - Richfaces 4 seems to be broken with JSF 2.2; the proposed workaround worked for me
Possible solution for 3: I added static resource servlet shipped with tomcat to web.xml and put the relative resources (query-ui theme in my project) under /static folder
<servlet>
<servlet-name>static-resource-servlet</servlet-name>
<servlet-class>
org.apache.catalina.servlets.DefaultServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>static-resource-servlet</servlet-name>
<url-pattern>/static/*</url-pattern>
</servlet-mapping>