Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 16th, 2002, 11:07 AM
robertbaker robertbaker is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 1 robertbaker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to robertbaker
Session ID problem (?)

I am working with sessions, which I don't have too much experience with
(yet). In trying to make sure my logout code works correctly, I am printing
the session ID on each page I visit, before and after I log the user out. I
have an index.html page which allows users to login or register. When they
register, I put cookies on their machine to make it easier to log them in
the next time they visit. When they login after the cookies are placed on
their machines, the code automatically skips the login form and goes
straight to the content the site provides. The problem seems to be that two
separate session IDs are created, one by the "home" page (NOT index.html)
and one by the remaining pages. Below is a trace of the pages I'm visiting
in my test, with the session IDs associated with each.

INDEX.HTML
LOGIN.JSP Session ID : czyf9dp7.224f
<<< LoginServlet >>>
HOME.JSP Session ID : czyf9dp7.e83 (*)
SETTINGS.JSP Session ID : czyf9dp7.224f
FAQ.JSP Session ID : czyf9dp7.224f
CONTACT.JSP Session ID : czyf9dp7.224f
HOME.JSP Session ID : czyf9dp7.224f (#)
LOGOUT.JSP Session ID : czyf9dp7.224f

< old session was invalidated here >

INDEX.HTML
LOGIN.JSP Session ID : czyf9dp7.6a03
<<< LoginServlet >>>
HOME.JSP Session ID : czyf9dp7.72a9 (*)
SETTINGS.JSP Session ID : czyf9dp7.6a03
FAQ.JSP Session ID : czyf9dp7.6a03
CONTACT.JSP Session ID : czyf9dp7.6a03
HOME.JSP Session ID : czyf9dp7.6a03 (#)

What's really odd is that the first time the home.jsp page is visited (*),
it's ID is different from the others, but the second time (#) it matches.

Each JSP has the session page directive set to true. Also, the code that
checks the login information is a servlet.

Any ideas?
Bob

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Session ID problem (?)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap