起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1546|回复: 2

[结贴] 用icomoon下载的图标和现有图标冲突了吗?

[复制链接]

1

主题

2

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2016-9-5 11:50:16 | 显示全部楼层 |阅读模式
我按照http://doc.wex5.com/custom-icon/的方法,把下载的文件中的style.css改名为icomoon.icons.css,并在设计器里引用这个css。在指定图标时发现下拉框里是多了icomoon这个目录,但是图标是空的,不显示。然后icon目录下的所有图标都变成空白了。控制台有很多红色的错误信息:
九月 05, 2016 11:28:06 上午 org.apache.catalina.core.StandardHostValve custom
严重: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]
org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:424)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
        at org.apache.catalina.connector.Response.getWriter(Response.java:611)
        at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
        at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
        at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
        at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
        at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
        at org.apache.jsp.error_jsp._jspService(error_jsp.java:147)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
        ... 18 more
发表于 2016-9-5 15:35:07 | 显示全部楼层
需要注意的是!整个项目所有资源都需要放在UI2项目中!不能只放一两个文件!肯定是不起作用的!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

1

主题

2

帖子

8

积分

新手上路

Rank: 1

积分
8
 楼主| 发表于 2016-9-6 09:23:18 | 显示全部楼层
解决了。修改了字体目录下css的内容,保证类名和css的文件名一样,同时不能使用已有的类名,就可以了,因为X5自带一个叫icon的类,而我下载的icomoon的默认css文件里也有这个icon类,后来改成icomoon类,同时把css文件名style.css改成icomoon.icons.css就可以了。css内容如下:
但是好像eclipse要重启才能在设计器里看到更新后的图标,不过在浏览器里马上可以看到。
@font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?4a54yu');
  src:  url('fonts/icomoon.eot?4a54yu#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?4a54yu') format('truetype'),
    url('fonts/icomoon.woff?4a54yu') format('woff'),
    url('fonts/icomoon.svg?4a54yu#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

.icomoon .icomoon-shoeprints {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-shoeprints:before {
  content: "\e900";
}

原先下载的css是这样子的:
@font-face {
  font-family: 'icomoon';
  src:  url('fonts/icomoon.eot?4a54yu');
  src:  url('fonts/icomoon.eot?4a54yu#iefix') format('embedded-opentype'),
    url('fonts/icomoon.ttf?4a54yu') format('truetype'),
    url('fonts/icomoon.woff?4a54yu') format('woff'),
    url('fonts/icomoon.svg?4a54yu#icomoon') format('svg');
  font-weight: normal;
  font-style: normal;
}

[class^="icon-"], [class*=" icon-"] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'icomoon' !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-shoeprints:before {
  content: "\e900";
}


回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-24 14:57 , Processed in 0.101664 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表