Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy JSF saves the state of UI components on server?
    primarykey
    data
    text
    <ol> <li><p><strong>Until what point in time does JSF save the state of UI components on the server side &amp; when exactly is the UI component's state information removed</strong> from the server memory? As a logged-in user on the application navigates though pages, will the state of components keep on accumulating on the server?</p></li> <li><p>I don't understand <strong>what is the benefit of keeping UI components state on server !?</strong> Isn't directly passing the validated/converted data to managed beans enough? Can I or should I try to avoid it? </p></li> <li><p>Doesn't that consume <em>too much</em> memory on the server side, if there are thousands of concurrent user sessions? I have an application where users can post blogs on certain topics. This blogs are quite large in size. When there will be post back or request for viewing the blogs, <strong>will this big page data be saved as a part of the state of components?</strong> This would eat up too much memory. Isn't this a concern ?</p></li> </ol> <hr> <h1>Update 1:</h1> <p>Now, it is no longer necessary to save state while using JSF. A high performance Stateless JSF implementation is available for use. See this <a href="http://industrieit.com/blog/2011/11/stateless-jsf-high-performance-zero-per-request-memory-overhead/" rel="noreferrer">blog</a> &amp; <a href="https://stackoverflow.com/questions/10385340/jsf-state-saving-initially-to-server-on-session-timeout-transfer-to-client">this question</a> for relevant details &amp; discussion. Also, there is an open <a href="http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1055" rel="noreferrer">issue</a> to include in JSF specs, an option to provide stateless mode for JSF. (P.S. Consider voting for the issues <a href="http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1055" rel="noreferrer">this</a> &amp; <a href="https://issues.apache.org/jira/browse/MYFACES-3465" rel="noreferrer">this</a> if this is a useful feature for you.)</p> <p><br/></p> <h1>Update 2 (24-02-2013):</h1> <p>A great news that <strong>Mojarra 2.1.19</strong> is out with <strong>stateless mode</strong>!</p> <p>See here:</p> <p><a href="http://weblogs.java.net/blog/mriem/archive/2013/02/08/jsf-going-stateless?force=255" rel="noreferrer">http://weblogs.java.net/blog/mriem/archive/2013/02/08/jsf-going-stateless?force=255</a></p> <p><a href="http://java.net/jira/browse/JAVASERVERFACES-2731" rel="noreferrer">http://java.net/jira/browse/JAVASERVERFACES-2731</a></p> <p><a href="http://balusc.blogspot.de/2013/02/stateless-jsf.html" rel="noreferrer">http://balusc.blogspot.de/2013/02/stateless-jsf.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload