• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet_Servlet Communication

 
ch praveen
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
Iam developing a chatting program. I approached the scenario that is implemented in http://pub.spccatv.com.cn/~rison/servlet/ch10_02.htm [Object Based Http Access] and http://pub.spccatv.com.cn/~rison/servlet/ch10_03.htm. To be more specific I implemented a polling mechanism where a client constantly checks the server for the next message. Here messages are not strings, they are objects containing extra details such as userid,roomid and so on. Iam getting many problems which are listed below::
[NOTE:: At present Iam maintaing only one room]
[1] When messages are passed like a flood to the server, the respective user's browser is getting struck.
[2] I have created a hashtable containing users details once they logged in and stored it in a ServletContext so all clients (users) could get the details of users logged into the room. In Applet's init() method I implemented a Applet-Servlet Communication which connects to the server and gets the users details like a Enumeration Object and adds details to the List. But this thing is not happening (Listbox is not filled). Can't we implement Applet-Servlet Communication in an applets init() method.
[3] Iam using Tomcat as a webserver. Even though I have stopped the server and restarted it, it is remembering the previous details [i.e Servlet Context Attributes details - Hashtable containg users details] such as users details and making the things much worse for me.
Any Of Your suggestions Are Highly Appreciated.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ch prv, it is great to see that you are working hard on your project, you will find that you will learn quite a bit, and the frustrations now, will have a great payback at the end.
However, you still need to adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks!
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic