1

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

Thanks

slacky82
  • 342
  • 4
  • 11

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
  • 929
  • 11
  • 17