Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>As of JSF 2.x there are 4 Bean Scopes: </p> <ul> <li>@SessionScoped </li> <li>@RequestScoped</li> <li>@ApplicationScoped</li> <li>@ViewScoped </li> </ul> <p><strong>Session Scope:</strong> The session scope persists from the time that a session is established until session termination. A session terminates if the web application invokes the invalidate method on the HttpSession object, or if it times out.</p> <p><strong>RequestScope:</strong> The request scope is short-lived. It starts when an HTTP request is submitted and ends after the response is sent back to the client. If you place a managed bean into request scope, a new instance is created with each request. It is worth considering request scope if you are concerned about the cost of session scope storage.</p> <p><strong>ApplicationScope:</strong> The application scope persists for the entire duration of the web application. That scope is shared among all requests and all sessions. You place managed beans into the application scope if a single bean should be shared among all instances of a web application. The bean is constructed when it is first requested by any user of the application, and it stays alive until the web application is removed from the application server.</p> <p><strong>ViewScope:</strong> View scope was added in JSF 2.0. A bean in view scope persists while the same JSF page is redisplayed. (The JSF specification uses the term view for a JSF page.) As soon as the user navigates to a different page, the bean goes out of scope.</p> <p>Choose the scope you based on your requirement.</p> </blockquote> <p><strong>Source:</strong> <a href="http://horstmann.com/corejsf/" rel="noreferrer">Core Java Server Faces 3rd Edition</a> by David Geary &amp; Cay Horstmann [Page no. 51 - 54] <img src="https://i.stack.imgur.com/ZXZCU.png" alt="enter image description here"></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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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