This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

active session loses attribute  RSS feed

 
M. Pr�pper
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right. They were different sessions. Unintendedly, but all the same true, so thanks for directing me towards the answer.
Marc
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!