【问题标题】:FontAwesome 5 javax.el.ELException: Failed to parse the expression [#{resource['atlas-layout:fonts/fa-brands-400.eot]}]FontAwesome 5 javax.el.E​​LException:无法解析表达式 [#{resource['atlas-layout:fonts/fa-brands-400.eot]}]
【发布时间】:2018-04-17 11:34:52
【问题描述】:

我是 CSS 和 Font Awesome 世界的新手,在 primfaces atlas 主题中将我的 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 等新图标

我添加了从 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; }

请帮忙

【问题讨论】:

  • 这个 PrimeFaces 有什么关系?您更新了什么以及如何更新?
  • @Kukeltje 我更新了我的代码,就像我是如何做到的那样

标签: css primefaces el font-awesome-5


【解决方案1】:

这个错误似乎完全正确。在 EACH

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

您在 [ 之后有一个“打开”引号,但在 ] 之前没有一个“结束”引号。与original PrimeFaces ones 比较时很容易找到。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-10-22
    • 1970-01-01
    • 1970-01-01
    • 2013-11-27
    • 2015-04-16
    • 2012-02-16
    • 1970-01-01
    相关资源
    最近更新 更多