Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 2 Omnifaces Gzip压缩不压缩接受编码:Gzip,deflate set_Jsf 2_Primefaces_Gzip_Omnifaces - Fatal编程技术网

Jsf 2 Omnifaces Gzip压缩不压缩接受编码:Gzip,deflate set

Jsf 2 Omnifaces Gzip压缩不压缩接受编码:Gzip,deflate set,jsf-2,primefaces,gzip,omnifaces,Jsf 2,Primefaces,Gzip,Omnifaces,我使用的是Omnifaces 1.7/primefaces 5.2/jsf 2.0/J2EE5/weblogic 10.3/IE11 我已经设置了GzipResponseFilter来为我的webapp启用压缩。尽管添加了以下配置,但我看不到在浏览器中收到的响应大小有任何差异。我正在使用IE11及其调试器工具来检查响应大小。我还看到在IE11的请求头中传递了Accept Encoding-gzip,deflat。有谁能帮我知道为什么我看不到压缩工作。下面是web.xml <filter&g

我使用的是Omnifaces 1.7/primefaces 5.2/jsf 2.0/J2EE5/weblogic 10.3/IE11

我已经设置了GzipResponseFilter来为我的webapp启用压缩。尽管添加了以下配置,但我看不到在浏览器中收到的响应大小有任何差异。我正在使用IE11及其调试器工具来检查响应大小。我还看到在IE11的请求头中传递了Accept Encoding-gzip,deflat。有谁能帮我知道为什么我看不到压缩工作。下面是web.xml

<filter>
    <filter-name>gzipResponseFilter</filter-name>
    <filter-class>org.omnifaces.filter.GzipResponseFilter</filter-class>
    <init-param>
        <param-name>threshold</param-name>
        <param-value>150</param-value> <!-- size larger than 150 should be compressed -->
    </init-param>
    <init-param>
        <param-name>mimetypes</param-name>
        <param-value>
     text/plain, text/html, text/xml, text/css, text/javascript, text/csv, text/rtf,
     application/xml, application/xhtml+xml, application/javascript, application/json
        </param-value>
    </init-param>
</filter>
<filter-mapping>
    <filter-name>gzipResponseFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>

gzipResponseFilter
org.omnifaces.filter.gzip响应过滤器
门槛
150
模版
text/plain、text/html、text/xml、text/css、text/javascript、text/csv、text/rtf、,
application/xml、application/xhtml+xml、application/javascript、application/json
gzipResponseFilter
Facesservlet
要求
错误

尝试使用不同的URL模式

<filter-mapping>
    <filter-name>gzipResponseFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>

gzipResponseFilter
/*
要求
错误
请参阅下面的链接,以了解有关如何执行此操作的更多详细信息

您在响应编码中看到了什么?可能只是显示了未压缩的大小。在IE Debugger的响应头中,我看到的唯一与编码相关的内容如下。耐心是一种美德。如果事情紧急,找一些商业支持,我想在IE调试器中寻找压缩响应大小是错误的。IE显示解压缩后的响应大小。我应该使用fiddler来检查响应大小。一旦我检查了fiddler,就会更新帖子。