Using bootstrap 3 glypicon with webjars and jsf2.2

I am trying to create a simple page with bootstrap and glypicons in jsf 2.2. I turned on the bootstrap dependency on webjar (and opening the jar, I see that the font file is present).

When deploying the application in wildfly bootstrap css works correctly, but the displayed icons are terrible (like the default font or something else). Looking at the network tab in the browser, I see only 404 errors:

http://localhost:8080/proto/javax.faces.resource/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.woff 404

http://localhost:8080/proto/javax.faces.resource/bootstrap/3.1.1/fonts/glyphicons-halflings-regular.ttf 404

I tried to include another dependency (bootstrap-glypicons) and I only get 404 errors twice. What am I missing?

This is how I enable boostrap, which works correctly for css:

<h:outputStylesheet library="webjars" name="bootstrap/3.1.1/css/bootstrap.min.css" />

And this is how I use css classes:

<button><span class="glyphicon glyphicon-minus"></span></button>
+4
source share
2

<link> <h:outputStylesheet> .

<link rel="stylesheet" type="text/css" media="all" href="webjars/bootstrap/3.1.1/css/bootstrap.min.css"/>

---
, ResourceHandler JSF (webjars) URI : /javax.faces.resource//3.1.1/CSS/bootstrap.min.css? = webjars

bootstrap.min.css CSS : url ('../fonts/glyphicons-halflings-regular.woff') format ('woff'), url ('../fonts/glyphicons-halflings-regular.ttf') format ('truetype'),

, <h:outputStylesheet>, ResourceHander bootstrap.min.css glyphicons-halflings-regular.*

, html <link> <h:outputStylesheet>, JSF . bootstrap.min.css EL, <h:outputStylesheet>

+6

: webjars JSF CSS, CSS :

<h:outputStylesheet library="webjars" name="bootstrap/3.3.5/css/bootstrap-jsf.css" />

-jsf.

+2

Source: https://habr.com/ru/post/1537315/


All Articles