Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

urgent - session null

 
Nitin Gogia
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In a application; i have a JSP page which contains a link which points to servlet which serves the image.
Now the problem is when a servlet is called session is null. I am not able to figure out why i am getting the session as null. I am using encodeURL to encode the link (in order to append session id). Also this problem is not consistent. Sometimes it works and other times i get session as null.
Please help.
Regards,
Nitin
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like your JSP and the servlet that serves the image are not in the same web application so the session is not shared.
Bill
 
Nitin Gogia
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are a part of same web application. Also i mentioned that it works sometimes but most of the times it gives session is null. Therefore difficult to trace.
 
Praful Thakare
Ranch Hand
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is chance that session is expiring by time
you get to image servlet....
Praful
[ March 12, 2003: Message edited by: Praful Thakare ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic