• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Tracking

 
wesley alfred
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pals,
I am storing the user name in the session id, which i created by http session getSession(), i am calling a jsp page from servlet which carry the username and pops in the screen,
Its working fine in Iexplore 5.o but not in IE 6.0, it returns null,
pl quide me to proceed
thnks in advance
wesley
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I believe it has to work in both IE versions. Can you please your code.
Regards,
M.S.Raman
 
wesley alfred
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi M.S.Raman,
Let me explain my position in detail,
1. in a JSP page i am getting the username and password,
2. through java script i am directing to a particular servlet.
3.In the servlet i am validating the username and password if it is valid i am redirecting to a html page which contains a jsp page.
4. in that jsp page i am welcoming the user by his name.
5. for the full scenario i am validating the session by httpsession.
This think work fine in the browser ie5.0, but while retriving in ie6.0 it return null.
(i.e) actually i am storing the user name in the session variable.
so in the final jsp page the session variable does't hold the username rather null in ie6.0
wesley
 
Ayman Nour El Din
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
apparently your session id is not passed to the new jsp and a new session is created that contains of course nothing at all.
make sure you use this
response.encodeRedirectURL(url)
it appends the session id to the end of the url string , you may then use the whole url string in the redirection.
hope it works.
good luck
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
is your javascript & other things related to java working in IE6..!!??
hth
MB
 
randeep singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
u need to check if cookies are disabled in IE6.0 if so enable them
then there in no need to encode URL
randeep
 
wesley alfred
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi randeep,
Thnks when i enable the cookie in the browser ie6.0 my problem got solved i am getting the session variable displayed in my browser,
thnks Malli, Ayman, Malhar for your suggession.
well can i do something in my code to enable the cookie if the request particularly comes from ie6.0 before processing.
wesley
 
Malli Raman
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by wesley alfred:
Hi randeep,
Thnks when i enable the cookie in the browser ie6.0 my problem got solved i am getting the session variable displayed in my browser,
thnks Malli, Ayman, Malhar for your suggession.
well can i do something in my code to enable the cookie if the request particularly comes from ie6.0 before processing.
wesley

Hi Wesley,

Logically it is not possible. Because in the IE Cookies enable/disable feature is provided to the user to secure their systems. In this case you have to use URLRewriting methods for the session tracking.
Regards,
M.S.Raman
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic