0

I'm stuck at this question. I've used httpsessions before. But this time, I got this thing to choose between the two. A session-scoped managed bean or an httpsession.

What do you suggest ? Please mention pros and cons of each.

Thanks for helping :)

Mudassir Shahzad
  • 542
  • 2
  • 16
  • 32

1 Answers1

1

There are two concepts here:
Case For HTTPSession: lets say you have a variable called var_one and you want to access var_one within a session across multiple managed beans (irrespective of whether they are session scoped or not), then you need to use HTTPSession to store this variable.

Case Session Scoped Managed bean: Incase you need to manipulate this var_one variable only within one specific session scoped managed bean, then you can directly keep it in this bean and use it through out the session.

NiranjanBhat
  • 1,812
  • 13
  • 17