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

Session Tracking

 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I am doing a project using Servlets where i am putting a Hashtable object in the setAttribute() of the session
object, Is it a must that the contents of the Hashtable should be serialized.
Because the Session Contents are not made available in the other Servlet, or there may me any other reasons
the thing is session is getting tracked but not the values are made available.
Also when i am encoding my URL to hold session values its not generating any jsessionid as part of it. Please
do sort out the problem.
Regards
Roshini
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per session2.2 spec all session objects must be of serializable type. What's your hashtable holding? Are they are Strings or your own written classes ?
regds
maha anna
 
Roshini Sridharan
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Hashtable object holds Integer values, I still tried with creating my own class which implements Serializable but still it didn't work, Pls help out.
class Quantity implements Serializable
{
private int qty;
public Quantity(int q){qty=q;}
// get methods
}
Roshini Sridharan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic