参见:http://www.ceapet.com/topic40.html
使用Richfaces有一段时间,发现,Richfaces比较慢,简单的一个页面也需要很长时间,有点让人望而生畏。
找了一些优化的文章,研究了研究,似乎有点效果。不管拥有无用,还是照做。
当
然,也发现,用Firefox至少比IE或IE内核之类的浏览器快上N倍,不信,你试试。
在web.xml中要进行如下配置
代码
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<init-param>
<param-name>forceparser</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enable-cache</param-name>
<param-value>true</param-value> </init-param>
<init-param>
<param-name>createTempFiles</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxRequestSize</param-name>
<param-value>1024000000</param-value>
</init-param>
</filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
<init-param>
<param-name>forceparser</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>enable-cache</param-name>
<param-value>true</param-value> </init-param>
<init-param>
<param-name>createTempFiles</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>maxRequestSize</param-name>
<param-value>1024000000</param-value>
</init-param>
</filter>
增加forceparser 和enable-cache配置项...