1

I have to create a @managedBean to manage thelogin/logout user, what is the right scope of it? @SessionScoped or @RequestScoped

Thanks

slacky82
  • 303
  • 3
  • 9

1 Answers1

2

Use @RequestScoped, so the bean will be quickly removed after login. It is created upon a HTTP request and destroyed when the HTTP response is finished.

The Java EE 6 Tutorial

@RequestScoped

J Slick
  • 871
  • 11
  • 17