aspose file tools*
The moose likes Servlets and the fly likes cookies and shoping baskets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "cookies and shoping baskets" Watch "cookies and shoping baskets" New topic
Author

cookies and shoping baskets

Wendy Gibbons
Bartender

Joined: Oct 21, 2008
Posts: 1107

Ok i am rather a web site newbie, and looking for design patterns really

how do you write a shopping basket if cookies are turned off?

i could use url rewritting (the name from head first) but i was using cookies to get around session timeout.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3166
    
  47

Wendy Gibbons wrote:i could use url rewritting (the name from head first) but i was using cookies to get around session timeout.

Session timeout depends on the HttpSession object. Even if URL rewriting is used, the HttpSession object remains accessible as the same way as how you use it when cookies are used.

Devaka


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 274

You could configure the session to never timeout by setting the session-timeout to -1. Then, store the shopping cart info as session attributes.


SCJP 6 || SCWCD 5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cookies and shoping baskets