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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
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: 1106

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: 2885
    
  13

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
My 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://aspose.com/file-tools
 
subject: cookies and shoping baskets
 
Similar Threads
newbie : session problem
Session sharing (JSP-PHP)
WA #1.....word association
remember user password in jsp/java
handling next and back buttons in javascript