my dog learned polymorphism*
The moose likes Servlets and the fly likes active session loses attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "active session loses attribute" Watch "active session loses attribute" New topic
Author

active session loses attribute

M. Pr�pper
Greenhorn

Joined: May 17, 2004
Posts: 4
Hi,

The problem is that an active session loses an attribute without explicitly removing it by setting it to null. Here's how and when it happens:
An apache web server runs an index html file. This file has a link to a servlet: upon clicking, the call is redirected to a second, Tomcat server that hangs behind the apache server and cannot be called directly itself.

The servlet creates a session and sets an attribute. When you return to the index file and then visit the servlet again, the session is preserved, but the attribute gets lost. Has anyone got a clue?
Thanks, Marc
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
Why do you think that you are seeing the same session? Sounds to me like you are getting a new one every time.
Bill
M. Pr�pper
Greenhorn

Joined: May 17, 2004
Posts: 4
You're right. They were different sessions. Unintendedly, but all the same true, so thanks for directing me towards the answer.
Marc
 
jQuery in Action, 2nd edition
 
subject: active session loses attribute