Jason Foy wrote:
I want to make this more clear.
mmm. ;-)
The chat client sends HTTP get to web
server to initate a chat session.

Ok, who/what is the "chat client" ? is it a browser ? is it something running in a browser ?


 In the back end, java servlet gets
this request and form a loop to prevent the session from ending,meanwhile spawn another thread to connect to person2 using plain socket.

Who/what is "person2" ? it cannot be a browser, because a browser is not opening a socket to "listen" to incoming requests. And how does this other thread connect to that "person2" ? does it have a table with "name = ipaddress:port" to know what to connect to ?

Person1 use HTTP Post to send a text. Person2 sends the data to
servlet through a socket.

Which socket ? the same one that was opened (to person2) by the additional servlet thread mentioned above ?

The servlet sends the javascript to IIS 7 via ISAPI.

So, "chat client #1" connects to the HTTP server and sends a HTTP GET request to initiate the session. Then it waits for a response, supposedly a html page "containing" - a parent window containing a <script></script> section which contains the function receiveText()
- a child window which calls this function and displays the retrieved text

The server gets this request; somehow it opens a connection with "chat client #2" which is not a browser. And then it sends back a html response to "chat client #1", which is this html page mentioned above.

But "chat client #1" never gets the javascript part of this html page.


The javascript should be delivered to chat client's web browser and web browser execute this javascript and display the message on chat client's chat window.

The problem is I don't know where the javascript packet is lost.

Neither do I, if really that javascript section is included inside of a html page that "chat client #1" does receive. If chat client #1 receives the html page, then it should also receive the javascript that is inside it, no ?


Honestly, so far I do not see what the connector or Tomcat can have to do with this. The connector is certainly not stripping selectively one section out of a html response page.
Maybe you should look closer at your servlet, why it is not sending it ?

Again, get a browser plugin to /really/ see what "chat client #1" is sending and receiving from the webserver. Until you do that, and really see what is happening, you will be in the dark, and me too.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to