HTML and CSS Reference
In-Depth Information
Project Stage
Setting javax.faces.PROJECT_STAGE parameter to " Development" allows the JSF environment to print out debugging
information in the pages. This can be helpful during development, but it has no useful purpose after deployment
unless you are troubleshooting an error or problem in the testing environment. In production, always set this
parameter value to " Production" in order to improve performance during production as shown in the following.
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...>
...
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Production</param-value>
</context-param>
...
</web-app>
State Saving Method
Setting javax.faces.STATE_SAVING_METHOD parameter to " server" (which is the default value) gives better
performance than setting this parameter to "client" . This is because server state saving does not require serialization
of the state. The following is an example of setting state saving method to "server" .
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...>
...
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
...
</web-app>
However, it is important to know that if you do not have enough memory in the server, you can set the state saving
method to "client" .
Response Buffer
It is recommended to increase the response buffer size in order to reduce memory reallocations at rendering
time, this can be achieved by setting javax.faces.FACELETS_BUFFER_SIZE parameter (and com.sun.faces.
responseBufferSize parameter if you are using Mojarra) to proper values that are suitable to your application server
memory capacity as shown in the following example.
<?xml version="1.0" encoding="UTF-8"?>
<web-app ...>
...
<context-param>
<param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
<param-value>500000</param-value>
</context-param>
 
Search WWH ::




Custom Search