What are the different scopes available in JSF for a managed bean?

Answered

What are the different scopes available in JSF for a managed bean?

Ninja Asked on 19th September 2018 in JSF.
Add Comment
1 Answer(s)
Best answer

The different scopes available in JSF for a managed bean are:

  • Application (@ApplicationScoped): Application scope persists across all users’ interactions with a web application.
  • Session (@SessionScoped): Session scope persists across multiple HTTP requests in a web application.
  • View (@ViewScoped): View scope persists during a user’s interaction with a single page (view) of a web application.
  • Request (@RequestScoped): Request scope persists during a single HTTP request in a web application.
  • None (@NoneScoped): Indicates a scope is not defined for the application.
  • Custom (@CustomScoped): A user-defined, nonstandard scope. Its value must be configured as a  java.util.Map. Custom scopes are used rarely.
Ninja Answered on 19th September 2018.
Add Comment