Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

httpsession shared across requests getting Null always

 
Prashant Upasani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet code:

When I run this servlet first time, I get session as null and then session gets created which is perfect.
When I run the same servlet again (by refreshing the page on the same browser window) I should get session not null. Surprisingly I am getting it null always and then creating new session for every request.
Also, when I open the new instance of browser (using ctrl + N) I am getting session null in the code above.
I am using Tomcat 5.5.26 installed on Windows vista (internet explorer 7).

Thanks for all your help to solve this puzzle.

[ June 12, 2008: Message edited by: Prashant Upasani ]

[ June 12, 2008: Message edited by: Prashant Upasani ]
[ June 13, 2008: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extermely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would get that result if the browser security settings prevent accepting cookies.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!