tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sunita desai" <sude...@cisco.com>
Subject How to avoid the staus code (-1) being sent from Servlet to Applet? Tomcat experts please Help!!
Date Sat, 05 Oct 2002 04:09:16 GMT
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,#:00161414444756
1


76
gw-final-xlated-cdn=ton:1,npi:1,#:61414444756
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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message