FontAwesome 5 javax.el.E​​LException:无法解析表达式[#{resource [' atlas-layout:fonts / fa-brands-400.eot]}]

时间:2018-04-17 11:34:53

标签: css primefaces el font-awesome-5

我是CSS&字体很棒的世界,我在初始图集主题中将我的Font Awesome从4.4.0更新到5.0.10时遇到了问题,

这是例外

Caused by: org.apache.el.parser.ParseException: Encountered " <ILLEGAL_CHARACTER> "\' "" at line 1, column 12.
Was expecting one of:
    "{" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    "null" ...
    "(" ...
    "[" ...
    "!" ...
    "not" ...
    "empty" ...
    "-" ...
    <IDENTIFIER> ...
    <IDENTIFIER> ...
    "(" ...

    at org.apache.el.parser.ELParser.generateParseException(ELParser.java:3090)

和我的

  

fa fa图标工作正常,但不是新的,如FAB,FAR

enter image description here

我添加了从fontAwesome下载并替换为旧文件的文件, 并编辑了font-awesome.css

@font-face {
  font-family: 'Font Awesome 5 Brands';
  font-style: normal;
  font-weight: normal;
  src: url("#{resource['atlas-layout:fonts/fa-brands-400.eot]}");
  src: url("#{resource['atlas-layout:fonts/fa-brands-400.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-brands-400.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-brands-400.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-brands-400.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-brands-400.svg]}#fontawesome") format("svg"); }

.fab {
  font-family: 'Font Awesome 5 Brands'; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 400;
  src: url("#{resource['atlas-layout:fonts/fa-regular-400.eot]}");
  src: url("#{resource['atlas-layout:fonts/fa-regular-400.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-regular-400.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-regular-400.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-regular-400.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-regular-400.svg]}#fontawesome") format("svg"); }

.far {
  font-family: 'Font Awesome 5 Free';
  font-weight: 400; }
@font-face {
  font-family: 'Font Awesome 5 Free';
  font-style: normal;
  font-weight: 900;
  src: url("#{resource['atlas-layout:fonts/fa-solid-900.eot]}");
  src: url("#{resource['atlas-layout:fonts/fa-solid-900.eot]}?#iefix") format("embedded-opentype"), url("#{resource['atlas-layout:fonts/fa-solid-900.woff2]}") format("woff2"), url("#{resource['atlas-layout:fonts/fa-solid-900.woff]}") format("woff"), url("#{resource['atlas-layout:fonts/fa-solid-900.ttf]}") format("truetype"), url("#{resource['atlas-layout:fonts/fa-solid-900.svg]}#fontawesome") format("svg"); }

.fa,
.fas {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900; }

请帮助解决此问题

1 个答案:

答案 0 :(得分:0)

错误似乎完全正确。

中的 EACH
#{resource['atlas-layout:fonts/fa-brands-400.eot]}

在[之后] [但不是'结束'之前]有一个'开放'报价。与original PrimeFaces ones比较时很容易找到。