Bean Scopes
Note that the user bean is given a scope.
Session scope (most common):
- Lasts during repeated connections by the same client.
- Session tracking usually done with cookies, otherwise through
URL rewriting and session IDs.
Application scope:
- Lasts for duration of the web application.
- Shared among all requests and all sessions.
Request scope:
- Short-lived; new instance created with each request.
- Not appropriate if data is to persist beyond the request.