我们在我们的应用程序中使用了primefaces 2.2.1版本。我们想限制将存储在会话中的视图存储为3.我已经将我的web.xml配置为:
<context-param>
<description>State saving method: 'client' or 'server' (=default).See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<description>The maximum number of logical views (GET requests) to store per session (http://tinyurl.com/yw6f2e)</description>
<param-name>com.sun.faces.numberOfLogicalViews</param-name>
<param-value>3</param-value>
</context-param>
<context-param>
<description>The maximum number of JSF views (POST requests) stored in the session for per logical view (http://tinyurl.com/yw6f2e)</description>
<param-name>com.sun.faces.numberOfViewsInSession</param-name>
<param-value>3</param-value>
</context-param>
看来,这种配置不起作用。当我查看内存堆转储时,我发现在会话中存储了15个视图。
使用Primefaces 2.2.1,在Mojarra 2.0.9上运行JSF 2.0.9
任何想法......