Definition and practical significance of @SessionScoped

I would like to understand the full meaning of annotation @SessionScopedin JSF ManagedBean.

I suppose this is due to the http session , but still this is not very clear to me when it starts, when it ends, and if it can be interrupted.

  • If I leave the browser open, without activity, for 2 hours. Is the session open?
  • Is the session split between browser tabs
  • Does the session perform an identity in Firefox, IE, or Safari?
  • ...
+3
source share
1 answer
  • no, session timeout if no activity
  • yes, the session is divided between browser tabs
  • , , cookie

, .

@PostConstruct beans ( ) , bean ( )

, session.invalidate() ( , web.xml). @PreDestroy ( ).

+3

Source: https://habr.com/ru/post/1758025/


All Articles