HTML and CSS Reference
In-Depth Information
<context-param>
<param-name>com.sun.faces.responseBufferSize</param-name>
<param-value>500000</param-value>
</context-param>
...
</web-app>
As shown in the example, both javax.faces.FACELETS_BUFFER_SIZE and com.sun.faces.responseBufferSize
parameters are set at 500000 bytes.
Number of Views in a Session
Number of views in session is represented by two different context parameters in Apache MyFaces and Oracle
Mojarra:
org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION (in Apache MyFaces)
com.sun.faces.numberOfViewsInSession (in Oracle Mojarra)
These parameters work only if the state saving method is set to "server" . It defines the maximum number of
serialized views stored in the session. By default it is set to 20 (in Apache MyFaces) or 15 (in Oracle Mojarra). For many
applications, having this parameter to 15 or 20 may not be suitable, so if it is not a requirement in your JSF application
to have such number of serialized views in the session, it is recommended to reduce it in order to save the server
memory, as shown in the following.
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...>
...
<context-param>
<param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
<param-value>3</param-value>
</context-param>
...
</web-app>
In Mojarra, there is another related context parameter (which works also in server-side state saving) that you
can tune, which is the ( com.sun.faces.numberOfLogicalViews ) parameter. This parameter represents the number
of logical views of the application that are stored in the session. By default, it is set to 15 . You can reduce this number
when possible in order to save the server memory as shown in the following.
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...>
...
<context-param>
<param-name>com.sun.faces.numberOfLogicalViews</param-name>
<param-value>3</param-value>
</context-param>
...
</web-app>
 
Search WWH ::




Custom Search