Restricting the Number of Views in a Session

 

    <context-param>
        <param-name>com.sun.faces.numberOfViewsInSession</param-name>
        <param-value>15</param-value>
    </context-param>

    <context-param>
        <param-name>com.sun.faces.numberOfLogicalViews</param-name>
        <param-value>15</param-value>
    </context-param>

   (com.sun.faces.config.WebConfiguration)

 

By default, a total of 15 top-level views are allowed to exist in a session. Likewise, a total of 15 logical views are also allowed in session. Logical views are subviews of a top-level view. For example, if you have a page that includes multiple frames then each frame is a logical view.

If you have a simple application then the default of 15 views or 15 logical views might be too large. In this case, you should consider reducing the allowable number of views and logical views to conserve memory. Conversely, a more complex application might require more than 15 views or logical views to be saved in a session.

猜你喜欢

转载自billben.iteye.com/blog/1962269