The moose likes JSF and the fly likes how to create session object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "how to create session object" Watch "how to create session object" New topic

how to create session object

sa sam
Ranch Hand

Joined: Mar 01, 2009
Posts: 46
i want to store bean object in session for that i am using

but when i retrieve o_beanCustomer value from session using

i am getting null value,

so, please tell me how to sore the session value and what's wrong in my code.
Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
You should of use session map instead of request map
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Better yet, you should seriously consider finding a way to do this using POJO techniques without all the convoluted JSF stuff.

The only time I ever do anything like this is when I need a true top-level session object and it can't be a managed bean.

And then I offload the actual manual session object get/put to a utility class so that my core core isn't littered with a lot of explicit javax.faces constructs. That way my code is easier to unit-test offline and I won't get clobbered the next time a new set of framework functions comes out.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: how to create session object
It's not a secret anymore!