• Post Reply Bookmark Topic Watch Topic
  • New Topic

URGENT in SessionTracking Please Clear it !!

 
kingshuk paul
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If anybody could ans.Please help me. urgent
Subject.
Suppose in shopping cart i am binding an assembly[object] object by session id[session.putValue(sessionid,Assebly);
or binding by key word like session.putValue("Cart",assebmly);
now if internet exploree tools=>Internet options-->security-->
internet [If i use degfault setting its woking fine retrieving values] but if i go for customise setting and set per session cookies [not stoterd] option disabled.
Every time page chnges the hash code of the session object is
changing means whatever i bind for the first time is not visible 2nd time.Since session object is changed.
Now could anybody kindly tell me how and whre should i bind my carting object so that in any setting it shouild work
in any browser.
Plese weitr the full code.Other than server configuration.And with it also.In both tomcat 4.0 and resin 2.0.2
thanks
kingshuk
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't want to require the user to permit cookies, you have two choices.
1. Use URLencoding to attach the session ID to all links that the user may follow.
2. Use a hidden variable in all forms and recover the sessionID that way.
Bill

------------------
author of:
 
Junilu Lacar
Sheriff
Posts: 10034
120
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
paul,
1. The putValue() method has been deprecated as of Version 2.2 of the servlet specification. Use setAttribute() instead.
2. Since the session collection is unique to each client anyway, there's no point in using the session id to identify objects added to the session collection. It would make more sense to use the session id if you were adding the objects to the application (ServletContext) collection since this collection is shared by all clients.
3. I usually use the servlet name as an identifier for objects added to the session collection.

4. If you are using getRequestSessionId(), you might want to check it first with the isRequestSessionIdXXX() methods.
Hope this helps,
Junilu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!