5

我们在我们的应用程序中使用 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

有任何想法吗...

4

0 回答 0