How to avoid the staus code (-1) being sent from Servlet to Applet? Tomcat experts please Help!!
Hi, To explain my problem, I have a plain Applet-Servlet communication. The servlet just reads an backend socket connection contents and keeps sending every 50 lines of information to the Applet. And the applet after receiving every 50 lines, displays it in TextArea without interpreting the data.And invokes the Servlet again as a URL. After every invocation of Servlet when I check the HttpConnection.getResponseCode in the Applet, it gives me status code 200 and message OK. And everything is O.k, in the sense the Applet displays only the actual data or the content being sent from Servlet.But sometimes, eventhough it is the same URL that is being invoked and Servlet is sent the next 50 lines as ususal, I get the Status code as -1 and the HttpConnection.getResponseMessage returns me null. And when this happens the actual HTTP header content(along with some HEX codes) is being displayed as data in the Applet display area, which distorts the actual data coming from the Socket connection. And then the next invocation of Servlet works fine as usual with status code 200. And the whole logic is working within a loop, so there can't be problem with that specific invocation of Servlet. If so then what could be the problem for sending -1 status code. But this behaviour is observed only sometimes,It happends randomly,Please give any pointers or suggestions as to how I can avoid this problem?Please advice. Is this some kind of known problem with Apache tomcat version 4.0.3? The Applet display output before and after the error looks like this: h323-ivr-out=reroute-count:0 h323-ivr out=route:INCCARRIER|Z1_SP_NTKG|11011|0|2|Z1_HK_OP|Z1_HK_ OP1_TG2|11009|0| Acct_in_octets:742 Acct_out_octets:806 Acct_in_packets:39 HTTP/1.1 200 OK Content-Type: text/html Date: Wed, 18 Sep 2002 20:07:08 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) 5c Acct_out_packets:46 1 62 Acct_session_time:20 secs 1 7d h323-disconnect-time=10:54:56.709 EST Sun May 5 2002 1 63 h323-disconnect-cause=10 1 69 h323-remote-address=10.15.89.150 1 5d h323-voice-quality=0 1 78 alert-timepoint=10:54:34.559 EST Sun May 5 2002 1 70 gw-rxd-cdn=ton:1,npi:1,#:0016141756 1 76 gw-final-xlated-cdn=ton:1,npi:1,#:6141756 1 73 gw-rxd-cgn=ton:4,npi:1,pi:0,si:1,#:8381756 1 59 info-type=speech 1 I appreciate any help in this regard, Thanks in advance, Sunita -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to avoid the Default HTTP header being sent from Servlet to Applet
Hi, To explain my problem, I have a plaing Applet-Servlet communication. The servlet just reads an backend socket connection contents and keeps sending every 50 lines of information to the Applet. And the applet after receiving every 50 lines, displays it in TextArea without interpreting the data.And invokes the Servlet again as a URL. Sometimes, the Servlet is sending the default header along with the data as given below, which distorts the actual data coming from the Socket connection. And infact I have not explicitly set any extra headers in the Servlet,nor the headers are being sent with every invocation of Servlet. It happends randomly,Please give any pointers or suggestions as to how I can avoid these HTTP headers being sent from the Servlet? I appreciate any help in this regard, Thanks in advance, Sunita The display output before and after the error looks like this: h323-ivr-out=reroute-count:0 h323-ivr out=route:INCCARRIER|Z1_SP_NTKG|11011|0|2|Z1_HK_OP|Z1_HK_ OP1_TG2|11009|0| Acct_in_octets:742 Acct_out_octets:806 Acct_in_packets:39 HTTP/1.1 200 OK Content-Type: text/html Date: Wed, 18 Sep 2002 20:07:08 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) 5c Acct_out_packets:46 1 62 Acct_session_time:20 secs 1 7d h323-disconnect-time=10:54:56.709 EST Sun May 5 2002 1 63 h323-disconnect-cause=10 1 69 h323-remote-address=10.15.89.150 1 5d h323-voice-quality=0 1 78 alert-timepoint=10:54:34.559 EST Sun May 5 2002 1 70 gw-rxd-cdn=ton:1,npi:1,#:0016141756 1 76 gw-final-xlated-cdn=ton:1,npi:1,#:6141756 1 73 gw-rxd-cgn=ton:4,npi:1,pi:0,si:1,#:8381756 1 59 info-type=speech 1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: (Help Needed!!)How to avoid the Default HTTP header being sent from Servlet to Applet
Hi, In addition to my problem definition in my earlier mail, I would like to add following. Actually I see that the header info is being sent from the Servlet to the applet everytime when it makes a URL connection to Servlet. It is something like this: 200: OK Date: Tue, 01 Oct 2002 12:53:14 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) content-length: 10363 But only sometimes the header info is also being treated as data and is printed by the Applet on the display area(TextArea). But only difference is when the header is displayed by Applet, the content-length header is missing. So is this problem anything to do with proper setting of content-length before making Servlet call from the Applet? I am clueless about this problem but struggling to close this display area. I request you to please go through my problem description and provide whatever clues/probable reasons so that ahead to solve it. If you need more details, please let me know. Thanks in advance, Regards, Sunita -Original Message- From: sunita desai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 2:44 PM To: Tomcat Users List Subject: How to avoid the Default HTTP header being sent from Servlet to Applet Hi, To explain my problem, I have a plaing Applet-Servlet communication. The servlet just reads an backend socket connection contents and keeps sending every 50 lines of information to the Applet. And the applet after receiving every 50 lines, displays it in TextArea without interpreting the data.And invokes the Servlet again as a URL. Sometimes, the Servlet is sending the default header along with the data as given below, which distorts the actual data coming from the Socket connection. And infact I have not explicitly set any extra headers in the Servlet,nor the headers are being sent with every invocation of Servlet. It happends randomly,Please give any pointers or suggestions as to how I can avoid these HTTP headers being sent from the Servlet? I appreciate any help in this regard, Thanks in advance, Sunita The display output before and after the error looks like this: h323-ivr-out=reroute-count:0 h323-ivr out=route:INCCARRIER|Z1_SP_NTKG|11011|0|2|Z1_HK_OP|Z1_HK_ OP1_TG2|11009|0| Acct_in_octets:742 Acct_out_octets:806 Acct_in_packets:39 HTTP/1.1 200 OK Content-Type: text/html Date: Wed, 18 Sep 2002 20:07:08 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) 5c Acct_out_packets:46 1 62 Acct_session_time:20 secs 1 7d h323-disconnect-time=10:54:56.709 EST Sun May 5 2002 1 63 h323-disconnect-cause=10 1 69 h323-remote-address=10.15.89.150 1 5d h323-voice-quality=0 1 78 alert-timepoint=10:54:34.559 EST Sun May 5 2002 1 70 gw-rxd-cdn=ton:1,npi:1,#:0016141756 1 76 gw-final-xlated-cdn=ton:1,npi:1,#:6141756 1 73 gw-rxd-cgn=ton:4,npi:1,pi:0,si:1,#:8381756 1 59 info-type=speech 1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Please provide any clues for HTTP header Problem
-Original Message- From: sunita desai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 6:27 PM To: Tomcat Users List Subject: RE: (Help Needed!!)How to avoid the Default HTTP header being sent from Servlet to Applet Hi, In addition to my problem definition in my earlier mail, I would like to add following. Actually I see that the header info is being sent from the Servlet to the applet everytime when it makes a URL connection to Servlet. It is something like this: 200: OK Date: Tue, 01 Oct 2002 12:53:14 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) content-length: 10363 But only sometimes the header info is also being treated as data and is printed by the Applet on the display area(TextArea). But only difference is when the header is displayed by Applet, the content-length header is missing. So is this problem anything to do with proper setting of content-length before making Servlet call from the Applet? I am clueless about this problem but struggling to close this display area. I request you to please go through my problem description and provide whatever clues/probable reasons so that ahead to solve it. If you need more details, please let me know. Thanks in advance, Regards, Sunita -Original Message- From: sunita desai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 2:44 PM To: Tomcat Users List Subject: How to avoid the Default HTTP header being sent from Servlet to Applet Hi, To explain my problem, I have a plaing Applet-Servlet communication. The servlet just reads an backend socket connection contents and keeps sending every 50 lines of information to the Applet. And the applet after receiving every 50 lines, displays it in TextArea without interpreting the data.And invokes the Servlet again as a URL. Sometimes, the Servlet is sending the default header along with the data as given below, which distorts the actual data coming from the Socket connection. And infact I have not explicitly set any extra headers in the Servlet,nor the headers are being sent with every invocation of Servlet. It happends randomly,Please give any pointers or suggestions as to how I can avoid these HTTP headers being sent from the Servlet? I appreciate any help in this regard, Thanks in advance, Sunita The display output before and after the error looks like this: h323-ivr-out=reroute-count:0 h323-ivr out=route:INCCARRIER|Z1_SP_NTKG|11011|0|2|Z1_HK_OP|Z1_HK_ OP1_TG2|11009|0| Acct_in_octets:742 Acct_out_octets:806 Acct_in_packets:39 HTTP/1.1 200 OK Content-Type: text/html Date: Wed, 18 Sep 2002 20:07:08 GMT Transfer-Encoding: chunked Server: Apache Tomcat/4.0.3 (HTTP/1.1 Connector) 5c Acct_out_packets:46 1 62 Acct_session_time:20 secs 1 7d h323-disconnect-time=10:54:56.709 EST Sun May 5 2002 1 63 h323-disconnect-cause=10 1 69 h323-remote-address=10.15.89.150 1 5d h323-voice-quality=0 1 78 alert-timepoint=10:54:34.559 EST Sun May 5 2002 1 70 gw-rxd-cdn=ton:1,npi:1,#:0016141756 1 76 gw-final-xlated-cdn=ton:1,npi:1,#:6141756 1 73 gw-rxd-cgn=ton:4,npi:1,pi:0,si:1,#:8381756 1 59 info-type=speech 1 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]