【问题标题】:Error loading css, cannot find "theme.css" resource of "primefaces-Omega" library Primefaces 6.0加载 css 时出错,找不到“primefaces-Omega”库 Primefaces 6.0 的“theme.css”资源
【发布时间】:2016-09-04 19:02:31
【问题描述】:

我在 JSF 2.2 上使用 PrimeFaces 6.0 以便从新的内置免费社区主题 Omega 中受益,但它对我不起作用。 在文档中说“要启用 omega,请将 primefaces.THEME 上下文参数设置为 Omega,就是这样”

我没有使用 maven 项目

这是我的 web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
</context-param>
<context-param>
    <param-name>primefaces.THEME</param-name>
    <param-value>Omega</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
    <param-value>true</param-value>
</context-param>
<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        18000
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>login.xhtml</welcome-file>
</welcome-file-list>

<context-param>
    <param-name>primefaces.UPLOADER</param-name>
    <param-value>commons</param-value>
</context-param>

<filter>
    <filter-name>PrimeFaces FileUpload Filter</filter-name>
    <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>PrimeFaces FileUpload Filter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>

【问题讨论】:

    标签: jsf primefaces themes


    【解决方案1】:

    primefaces official blog 中写成 Omega,大写“O”

    hhhh 它可以通过将其更改为 omega 来工作。

    【讨论】:

      猜你喜欢
      • 2015-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-13
      • 1970-01-01
      • 2013-10-20
      • 1970-01-01
      • 2014-05-16
      相关资源
      最近更新 更多