Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet servlet communication

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hello friends
I am facing a problem in applet-servlet communication .I am creating a quiz applet.But my servlet is not able keep session.I have used httpsession object. I am using web sphere test env. as server.Do you have any solution.Session API for servlets is not working.If you know any solution about it please mail me.
I will be very thankful for your guidence .
 
paul wheaton
Trailboss
Pie
Posts: 21513
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is that the browser has a different session than the applet. The servlet stuff provides a solution, but only through deprecated methods that, at least in JRun, don't work reliably.
The solution is to have a singleton that contains a hashtable of data objects on your servlet side: make your own custom session stuff - it's pretty simple. The only difficult part is setting up a thread that kicks off every few minutes to delete old data.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic