aspose file tools
The moose likes Servlets and the fly likes httpsession shared across requests getting Null always Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "httpsession shared across requests getting Null always" Watch "httpsession shared across requests getting Null always" New topic
Author

httpsession shared across requests getting Null always

Prashant Upasani
Greenhorn

Joined: Jan 09, 2008
Posts: 3
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

Joined: Jan 10, 2002
Posts: 56205
    
  13

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 .


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
You would get that result if the browser security settings prevent accepting cookies.

Bill


Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: httpsession shared across requests getting Null always
 
Similar Threads
Session Doubt?
session management in tomcat
Problem with session tracking
Tomcat 5.5.26 -IE7 Session issue
getting session null instead of creating new session.