What is the use of managed-bean-scope flag in the faces-config.xml in jsf ?
Managed bean scope defines the lifespan of managed bean. There are 4 possible values: “application”, “session”, “request” and “none”.
The session scope bean persists from the time that a session is established until session termination. A session terminates if the web application invalidate session manually, or if it times out (this timeout period is defined in your servlet container configuration, and usually lasts few minutes). This means that after your bean is created, it will last for some time and between requests. For example, in a shopping application, you want the server to remember the contents of the shopping cart for some user across several pages.
Application scope beans are persisted for the duration of the application.
“None” is not exactly a scope, and is used for beans that are used only as managed properties of another beans.