File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes cookies and shoping baskets Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 1098

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
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2691
    
    3

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 (Download) - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 272

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: cookies and shoping baskets
 
Similar Threads
handling next and back buttons in javascript
WA #1.....word association
remember user password in jsp/java
Session sharing (JSP-PHP)
newbie : session problem