views:

113

answers:

1

Hello every body now I work with shopping cart, I wonder use between Stateful session beans or HTTP session for cart or login. Everybody have any ideas?

In Stateful Session bean how to do compare state for item id, if it equals I will add to item one unit it means if item id = 1 it is coke and user add to cart one more coke it will become 2 coke unit. With HTTP session it easy but with Stateful and JSF I don't know how to do it?

And little question for change skin for site. I was create a combobox for user can select skin name and when user select other skin difference default skin, the default skin will change to other, but how I can change css and images ?

Please help me thank before!

+2  A: 

Hello every body now I work with shopping cart, I wonder use between Stateful session beans or HTTP session for cart or login. Everybody have any ideas?

There is a very nice old thread on TheServerSide that discusses HttpSession v.s. Stateful session beans (SFSB) and has nice examples where SFSB would make sense. To put it simply:

Using Stateful session Beans is relevant when you need a "state machine" for your business logic, and it's is independent from how you "interact" with the system (WAP/WML, HTML, XML/B2B, etc).

In other words, you might consider using SFSB for your shopping cart if users can access to the system via a different channel than HTTP (e.g. a call center) and still want to get access to the state. If you don't have such needs, stick to the HTTP session as SFSB induce some extra complexity.

And little question for change skin for site. I was create a combobox for user can select skin name and when user select other skin difference default skin, the default skin will change to other, but how I can change css and images ?

I would probably use some library offering a skinning mechanism, such as RichFaces.

Related questions

Pascal Thivent
thank you for your suggest
Kency