• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tell me what is wrong in this?

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All!
Topic :Session Tracking
_______________________
What I did?
____________
session.setAttribute("userid",userid);
session.getAttribute("userid");
ALl of you know this is the way of tracking session and this will work in all browsers,and unlike cookies no body can disable session also.
Then where does cookies comes into picture and what is wrong if I track
the users in my site using the method,I have desribed earlier.Is it the
right thing I'm doing to track the users.
Please advise me on this,
Thanks for all!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
The method that you have adopted is correct.
Session internally uses Cookies or URL rewriting. If cookies is disabled, it will use URL rewriting. You have to be aware of one thing though, if the server has resorted to URL rewriting, then you should do a response.encodeURL(String) for all the links/urls you will have on your view (jsp).
Hope that helps.
Regards,
Sanju
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi!
yeah using session is a good idea to track the users in ur site but it sometimes lead to complexities when ur site gets more complex in future.
u have to realy keep the track of the values u are going to store in session and evrytime a user is loged off then u should explicitly remove all values from the session..
yeah u can also use session.invalidate() method to do this...
but there are few cases (i have already faced those situations)when u don't want to completly remove the session...
in those cases if u r not handling sessions with care it may lead to many problems......
hope it helps u and u will care now...
best wishes
Sajjad Ahmed
 
archana vishwanath
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys,
But what will be the "some" problems in the method I have adopted.
and if Im going for cookies and the client disables cookies in his browser,
How to overcome this?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic