Re: Tomcat response Blank Page
On 08/03/2010 04:37, Shirely wrote: No error log. This is the return packet No. TimeSourceDestination Protocol Info 3749 202.714770 118.142.22.3 192.168.1.109 HTTP HTTP/1.1 200 OK Sure, but that does the access log say, does it also say zero bytes sent? What happens if the line: Utility.writeToFile(/WP.txt,str +\n); throws an exception? The only line which writes output to the response is after that line, so if something stops the page before or at that line, then the response body will be empty. Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. Your JSP seems simple, but I can't tell exactly where it's writing the WP.txt file to, so this may also be causing a problem. p Frame 3749 (170 bytes on wire, 170 bytes captured) Ethernet II, Src: Tp-LinkT_d2:89:3a (00:25:86:d2:89:3a), Dst: Tp-LinkT_b8:40:30 (00:27:19:b8:40:30) Internet Protocol, Src: 118.142.22.3 (118.142.22.3), Dst: 192.168.1.109 (192.168.1.109) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) Total Length: 156 Identification: 0x112b (4395) Flags: 0x02 (Don't Fragment) Fragment offset: 0 Time to live: 119 Protocol: TCP (0x06) Header checksum: 0xa38a [correct] Source: 118.142.22.3 (118.142.22.3) Destination: 192.168.1.109 (192.168.1.109) Transmission Control Protocol, Src Port: http (80), Dst Port: 52568 (52568), Seq: 1, Ack: 379, Len: 116 Source port: http (80) Destination port: 52568 (52568) [Stream index: 71] Sequence number: 1(relative sequence number) [Next sequence number: 117(relative sequence number)] Acknowledgement number: 379(relative ack number) Header length: 20 bytes Flags: 0x18 (PSH, ACK) Window size: 65536 (scaled) Checksum: 0xa7be [validation disabled] [Good Checksum: False] [Bad Checksum: False] [SEQ/ACK analysis] Hypertext Transfer Protocol HTTP/1.1 200 OK\r\n [Expert Info (Chat/Sequence): HTTP/1.1 200 OK\r\n] Request Version: HTTP/1.1 Response Code: 200 Server: Apache-Coyote/1.1\r\n Transfer-Encoding: chunked\r\n Date: Mon, 08 Mar 2010 04:21:06 GMT\r\n \r\n HTTP chunked response End of chunked encoding Chunk size: 0 octets Chunk boundary 00 27 19 b8 40 30 00 25 86 d2 89 3a 08 00 45 00 .'@0.%...:..E. 0010 00 9c 11 2b 40 00 77 06 a3 8a 76 8e 16 03 c0 a8 @.w...v. 0020 01 6d 00 50 cd 58 78 1e 12 3a 3e 9b 5f d4 50 18 .m.P.Xx..:._.P. 0030 01 00 a7 be 00 00 48 54 54 50 2f 31 2e 31 20 32 ..HTTP/1.1 2 0040 30 30 20 4f 4b 0d 0a 53 65 72 76 65 72 3a 20 41 00 OK..Server: A 0050 70 61 63 68 65 2d 43 6f 79 6f 74 65 2f 31 2e 31 pache-Coyote/1.1 0060 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 ..Transfer-Encod 0070 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 44 61 ing: chunked..Da 0080 74 65 3a 20 4d 6f 6e 2c 20 30 38 20 4d 61 72 20 te: Mon, 08 Mar 0090 32 30 31 30 20 30 34 3a 32 31 3a 30 36 20 47 4d 2010 04:21:06 GM 00a0 54 0d 0a 0d 0a 30 0d 0a 0d 0a T0 Pid Ster wrote: On 06/03/2010 18:36, Shirely wrote: I already monitor it by network packet level, I found that server side have receive the reqeust. and it have response it by sending out a packet. but the response packet only have a 0 at the body part. How many bytes does the access log say it sent? Is there any error in any other log? p Shirley n828cl wrote: From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
From: Pid [mailto:p...@pidster.com] Subject: Re: Tomcat response Blank Page Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. It's chunked output, so zero-length content is quite valid. I'm guessing whatever's been queued is just sent out - and somebody is swallowing the exception. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 3/8/2010 6:42 AM, Pid wrote: What happens if the line: Utility.writeToFile(/WP.txt,str +\n); throws an exception? The only line which writes output to the response is after that line, so if something stops the page before or at that line, then the response body will be empty. Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. This might have something to do with it: %@ page language=java import=java.text.*, java.util.*, tools.* errorPage= % The errorPage attribute is defined as a URL, so is a bit ambiguous, and may even cause /another/ error during error handling. AFAIK, page rendering errors aren't logged if an error page will be shown. Your JSP seems simple, but I can't tell exactly where it's writing the WP.txt file to, so this may also be causing a problem. +1 Also, the response isn't a 0, it's an HTTP response with no body (that is, Content-Length is 0, though not specified in the headers). - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuVE/4ACgkQ9CaO5/Lv0PByQwCgpYoD34yNpNCwU8OJIAnF89cJ hrMAn1hqhOtue4h0phsRyzoZa6BoOUat =R0bL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
On 08/03/2010 15:13, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Pid, On 3/8/2010 6:42 AM, Pid wrote: What happens if the line: Utility.writeToFile(/WP.txt,str +\n); throws an exception? The only line which writes output to the response is after that line, so if something stops the page before or at that line, then the response body will be empty. Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. This might have something to do with it: %@ page language=java import=java.text.*, java.util.*, tools.* errorPage= % The errorPage attribute is defined as a URL, so is a bit ambiguous, and may even cause /another/ error during error handling. AFAIK, page rendering errors aren't logged if an error page will be shown. Your JSP seems simple, but I can't tell exactly where it's writing the WP.txt file to, so this may also be causing a problem. +1 Also, the response isn't a 0, it's an HTTP response with no body (that is, Content-Length is 0, though not specified in the headers). I suppose that Utility.writeToFile() could be swallowing an exception and then resetting str to an empty string, which would produce the effect the OP describes. p - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuVE/4ACgkQ9CaO5/Lv0PByQwCgpYoD34yNpNCwU8OJIAnF89cJ hrMAn1hqhOtue4h0phsRyzoZa6BoOUat =R0bL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
I don't undestand it. But my page is not empty so why send out empty? Also, if u say some exception may exist, is it the exception for this user (me) only or exception in whole server (as the server is also using by other ppl). Shirley n828cl wrote: From: Pid [mailto:p...@pidster.com] Subject: Re: Tomcat response Blank Page Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. It's chunked output, so zero-length content is quite valid. I'm guessing whatever's been queued is just sent out - and somebody is swallowing the exception. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat-response-Blank-Page-tp27792029p27831329.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
What is the access log? How to check it? Pid Ster wrote: On 08/03/2010 04:37, Shirely wrote: No error log. This is the return packet No. TimeSourceDestination Protocol Info 3749 202.714770 118.142.22.3 192.168.1.109 HTTP HTTP/1.1 200 OK Sure, but that does the access log say, does it also say zero bytes sent? What happens if the line: Utility.writeToFile(/WP.txt,str +\n); throws an exception? The only line which writes output to the response is after that line, so if something stops the page before or at that line, then the response body will be empty. Admittedly, I can't think of a way for the page to stop there as a result of an exception and still send a 200 status, but it's worth exploring. Your JSP seems simple, but I can't tell exactly where it's writing the WP.txt file to, so this may also be causing a problem. p Frame 3749 (170 bytes on wire, 170 bytes captured) Ethernet II, Src: Tp-LinkT_d2:89:3a (00:25:86:d2:89:3a), Dst: Tp-LinkT_b8:40:30 (00:27:19:b8:40:30) Internet Protocol, Src: 118.142.22.3 (118.142.22.3), Dst: 192.168.1.109 (192.168.1.109) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) Total Length: 156 Identification: 0x112b (4395) Flags: 0x02 (Don't Fragment) Fragment offset: 0 Time to live: 119 Protocol: TCP (0x06) Header checksum: 0xa38a [correct] Source: 118.142.22.3 (118.142.22.3) Destination: 192.168.1.109 (192.168.1.109) Transmission Control Protocol, Src Port: http (80), Dst Port: 52568 (52568), Seq: 1, Ack: 379, Len: 116 Source port: http (80) Destination port: 52568 (52568) [Stream index: 71] Sequence number: 1(relative sequence number) [Next sequence number: 117(relative sequence number)] Acknowledgement number: 379(relative ack number) Header length: 20 bytes Flags: 0x18 (PSH, ACK) Window size: 65536 (scaled) Checksum: 0xa7be [validation disabled] [Good Checksum: False] [Bad Checksum: False] [SEQ/ACK analysis] Hypertext Transfer Protocol HTTP/1.1 200 OK\r\n [Expert Info (Chat/Sequence): HTTP/1.1 200 OK\r\n] Request Version: HTTP/1.1 Response Code: 200 Server: Apache-Coyote/1.1\r\n Transfer-Encoding: chunked\r\n Date: Mon, 08 Mar 2010 04:21:06 GMT\r\n \r\n HTTP chunked response End of chunked encoding Chunk size: 0 octets Chunk boundary 00 27 19 b8 40 30 00 25 86 d2 89 3a 08 00 45 00 .'@0.%...:..E. 0010 00 9c 11 2b 40 00 77 06 a3 8a 76 8e 16 03 c0 a8 @.w...v. 0020 01 6d 00 50 cd 58 78 1e 12 3a 3e 9b 5f d4 50 18 .m.P.Xx..:._.P. 0030 01 00 a7 be 00 00 48 54 54 50 2f 31 2e 31 20 32 ..HTTP/1.1 2 0040 30 30 20 4f 4b 0d 0a 53 65 72 76 65 72 3a 20 41 00 OK..Server: A 0050 70 61 63 68 65 2d 43 6f 79 6f 74 65 2f 31 2e 31 pache-Coyote/1.1 0060 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 ..Transfer-Encod 0070 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 44 61 ing: chunked..Da 0080 74 65 3a 20 4d 6f 6e 2c 20 30 38 20 4d 61 72 20 te: Mon, 08 Mar 0090 32 30 31 30 20 30 34 3a 32 31 3a 30 36 20 47 4d 2010 04:21:06 GM 00a0 54 0d 0a 0d 0a 30 0d 0a 0d 0a T0 Pid Ster wrote: On 06/03/2010 18:36, Shirely wrote: I already monitor it by network packet level, I found that server side have receive the reqeust. and it have response it by sending out a packet. but the response packet only have a 0 at the body part. How many bytes does the access log say it sent? Is there any error in any other log? p Shirley n828cl wrote: From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
From: Shirely [mailto:shir...@powerelab.com] Subject: RE: Tomcat response Blank Page I don't undestand it. But my page is not empty so why send out empty? The output isn't empty - it's a chunked response with zero bytes in the body. Perfectly valid, and typical of a servlet that quits before it's done. Also, if u say some exception may exist, is it the exception for this user (me) only or exception in whole server (as the server is also using by other ppl). An exception is triggered when a thread has a problem not reportable by normal method result (e.g., an I/O error). Nothing to do with you, just what the thread was trying to do at the time. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page What is the access log? How to check it? Read the doc: http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access%20Log%20Valve - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
No error log. This is the return packet No. TimeSourceDestination Protocol Info 3749 202.714770 118.142.22.3 192.168.1.109 HTTP HTTP/1.1 200 OK Frame 3749 (170 bytes on wire, 170 bytes captured) Ethernet II, Src: Tp-LinkT_d2:89:3a (00:25:86:d2:89:3a), Dst: Tp-LinkT_b8:40:30 (00:27:19:b8:40:30) Internet Protocol, Src: 118.142.22.3 (118.142.22.3), Dst: 192.168.1.109 (192.168.1.109) Version: 4 Header length: 20 bytes Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00) Total Length: 156 Identification: 0x112b (4395) Flags: 0x02 (Don't Fragment) Fragment offset: 0 Time to live: 119 Protocol: TCP (0x06) Header checksum: 0xa38a [correct] Source: 118.142.22.3 (118.142.22.3) Destination: 192.168.1.109 (192.168.1.109) Transmission Control Protocol, Src Port: http (80), Dst Port: 52568 (52568), Seq: 1, Ack: 379, Len: 116 Source port: http (80) Destination port: 52568 (52568) [Stream index: 71] Sequence number: 1(relative sequence number) [Next sequence number: 117(relative sequence number)] Acknowledgement number: 379(relative ack number) Header length: 20 bytes Flags: 0x18 (PSH, ACK) Window size: 65536 (scaled) Checksum: 0xa7be [validation disabled] [Good Checksum: False] [Bad Checksum: False] [SEQ/ACK analysis] Hypertext Transfer Protocol HTTP/1.1 200 OK\r\n [Expert Info (Chat/Sequence): HTTP/1.1 200 OK\r\n] Request Version: HTTP/1.1 Response Code: 200 Server: Apache-Coyote/1.1\r\n Transfer-Encoding: chunked\r\n Date: Mon, 08 Mar 2010 04:21:06 GMT\r\n \r\n HTTP chunked response End of chunked encoding Chunk size: 0 octets Chunk boundary 00 27 19 b8 40 30 00 25 86 d2 89 3a 08 00 45 00 .'@0.%...:..E. 0010 00 9c 11 2b 40 00 77 06 a3 8a 76 8e 16 03 c0 a8 @.w...v. 0020 01 6d 00 50 cd 58 78 1e 12 3a 3e 9b 5f d4 50 18 .m.P.Xx..:._.P. 0030 01 00 a7 be 00 00 48 54 54 50 2f 31 2e 31 20 32 ..HTTP/1.1 2 0040 30 30 20 4f 4b 0d 0a 53 65 72 76 65 72 3a 20 41 00 OK..Server: A 0050 70 61 63 68 65 2d 43 6f 79 6f 74 65 2f 31 2e 31 pache-Coyote/1.1 0060 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e 63 6f 64 ..Transfer-Encod 0070 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d 0a 44 61 ing: chunked..Da 0080 74 65 3a 20 4d 6f 6e 2c 20 30 38 20 4d 61 72 20 te: Mon, 08 Mar 0090 32 30 31 30 20 30 34 3a 32 31 3a 30 36 20 47 4d 2010 04:21:06 GM 00a0 54 0d 0a 0d 0a 30 0d 0a 0d 0a T0 Pid Ster wrote: On 06/03/2010 18:36, Shirely wrote: I already monitor it by network packet level, I found that server side have receive the reqeust. and it have response it by sending out a packet. but the response packet only have a 0 at the body part. How many bytes does the access log say it sent? Is there any error in any other log? p Shirley n828cl wrote: From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat-response-Blank-Page-tp27792029p27817029.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
No, My original code is doing some calculation at server and return is display as JSP and send to client. However, I found sometimes it will display blank page so I add this sample code to test the server. Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. So, I think it haven't run my JSP at that time, am I right? Then, what's wrong is my server? Shirley Pid Ster wrote: On 05/03/2010 15:09, Shirely wrote: I just try a very very simple code, here is the code. %@ page language=java import=java.text.*, java.util.*, tools.* errorPage= % % int count = 0; if(session.getAttribute(WH_Count)!= null){ Integer t = (Integer)session.getAttribute(WH_Count); count = t.intValue(); } count++; System.out.println(Count: + count); session.setAttribute(WH_Count, new Integer(count)); Calendar today = Calendar.getInstance(); String str = ; str += htmlhead/headbody bgcolor=\#D5D5D5\; str += today.getTime().toString() + brbr; str += Count value = + count + br; for(int i=0; i1; i++) str += i + ,; str += brEND/bodyhtml; Utility.writeToFile(/WP.txt,str +\n); out.print(str); % You are writing to and replacing a text file, for every single request to your JSP? p Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shirley, On 3/5/2010 5:05 AM, Shirely wrote: I have a Tomcat 6.0 run at Window Server 2008. We mainly used it to show some dynamic JSP by running java method at background. However, I found that tomcat server sometimes run abnormally. I see a red flag in your above statement: show some dynamic JSP by running java method at background. Could you please clarify this and/or post some code? If you are starting a new thread to perform some tasks in the background and not waiting for it, you can cause all sorts of problems. Then, we try to trace the code, we found that when it return blank page 1. server have receive the GET request and have return a packet to client which the packet body is 0 Is that a byte 0x00 or a 0 character? some more details would definitely help. 2. However, if the page have a counter on it. we found the counter haven't updated. So, it seems that whole jsp page haven't run yet. If the original page isn't returned properly, the counter (often an image) is never referenced, and therefore not updated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuRGzYACgkQ9CaO5/Lv0PBzXACgwtkDVVe0Wo4L5IHpW3pviDo6 BVUAoK4thjWyP/Ztpry22UNQl0vMtRWo =54pL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat-response-Blank-Page-tp27792029p27805751.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Tomcat response Blank Page
I already monitor it by network packet level, I found that server side have receive the reqeust. and it have response it by sending out a packet. but the response packet only have a 0 at the body part. Shirley n828cl wrote: From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat-response-Blank-Page-tp27792029p27806185.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
On 06/03/2010 18:36, Shirely wrote: I already monitor it by network packet level, I found that server side have receive the reqeust. and it have response it by sending out a packet. but the response packet only have a 0 at the body part. How many bytes does the access log say it sent? Is there any error in any other log? p Shirley n828cl wrote: From: Shirely [mailto:shir...@powerelab.com] Subject: Re: Tomcat response Blank Page Then, I found that when it display blank page, it will not update the session counter and also didn't read to text file. Sounds like something in between is responding to the request, rather than it reaching the server. Try running Wireshark on each end and see if you can catch the failure. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shirley, On 3/5/2010 5:05 AM, Shirely wrote: I have a Tomcat 6.0 run at Window Server 2008. We mainly used it to show some dynamic JSP by running java method at background. However, I found that tomcat server sometimes run abnormally. I see a red flag in your above statement: show some dynamic JSP by running java method at background. Could you please clarify this and/or post some code? If you are starting a new thread to perform some tasks in the background and not waiting for it, you can cause all sorts of problems. Then, we try to trace the code, we found that when it return blank page 1. server have receive the GET request and have return a packet to client which the packet body is 0 Is that a byte 0x00 or a 0 character? some more details would definitely help. 2. However, if the page have a counter on it. we found the counter haven't updated. So, it seems that whole jsp page haven't run yet. If the original page isn't returned properly, the counter (often an image) is never referenced, and therefore not updated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuRGzYACgkQ9CaO5/Lv0PBzXACgwtkDVVe0Wo4L5IHpW3pviDo6 BVUAoK4thjWyP/Ztpry22UNQl0vMtRWo =54pL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
I just try a very very simple code, here is the code. %@ page language=java import=java.text.*, java.util.*, tools.* errorPage= % % int count = 0; if(session.getAttribute(WH_Count)!= null){ Integer t = (Integer)session.getAttribute(WH_Count); count = t.intValue(); } count++; System.out.println(Count: + count); session.setAttribute(WH_Count, new Integer(count)); Calendar today = Calendar.getInstance(); String str = ; str += htmlhead/headbody bgcolor=\#D5D5D5\; str += today.getTime().toString() + brbr; str += Count value = + count + br; for(int i=0; i1; i++) str += i + ,; str += brEND/bodyhtml; Utility.writeToFile(/WP.txt,str +\n); out.print(str); % Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shirley, On 3/5/2010 5:05 AM, Shirely wrote: I have a Tomcat 6.0 run at Window Server 2008. We mainly used it to show some dynamic JSP by running java method at background. However, I found that tomcat server sometimes run abnormally. I see a red flag in your above statement: show some dynamic JSP by running java method at background. Could you please clarify this and/or post some code? If you are starting a new thread to perform some tasks in the background and not waiting for it, you can cause all sorts of problems. Then, we try to trace the code, we found that when it return blank page 1. server have receive the GET request and have return a packet to client which the packet body is 0 Is that a byte 0x00 or a 0 character? some more details would definitely help. 2. However, if the page have a counter on it. we found the counter haven't updated. So, it seems that whole jsp page haven't run yet. If the original page isn't returned properly, the counter (often an image) is never referenced, and therefore not updated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuRGzYACgkQ9CaO5/Lv0PBzXACgwtkDVVe0Wo4L5IHpW3pviDo6 BVUAoK4thjWyP/Ztpry22UNQl0vMtRWo =54pL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Tomcat-response-Blank-Page-tp27792029p27795115.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat response Blank Page
On 05/03/2010 15:09, Shirely wrote: I just try a very very simple code, here is the code. %@ page language=java import=java.text.*, java.util.*, tools.* errorPage= % % int count = 0; if(session.getAttribute(WH_Count)!= null){ Integer t = (Integer)session.getAttribute(WH_Count); count = t.intValue(); } count++; System.out.println(Count: + count); session.setAttribute(WH_Count, new Integer(count)); Calendar today = Calendar.getInstance(); String str = ; str += htmlhead/headbody bgcolor=\#D5D5D5\; str += today.getTime().toString() + brbr; str += Count value = + count + br; for(int i=0; i1; i++) str += i + ,; str += brEND/bodyhtml; Utility.writeToFile(/WP.txt,str +\n); out.print(str); % You are writing to and replacing a text file, for every single request to your JSP? p Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shirley, On 3/5/2010 5:05 AM, Shirely wrote: I have a Tomcat 6.0 run at Window Server 2008. We mainly used it to show some dynamic JSP by running java method at background. However, I found that tomcat server sometimes run abnormally. I see a red flag in your above statement: show some dynamic JSP by running java method at background. Could you please clarify this and/or post some code? If you are starting a new thread to perform some tasks in the background and not waiting for it, you can cause all sorts of problems. Then, we try to trace the code, we found that when it return blank page 1. server have receive the GET request and have return a packet to client which the packet body is 0 Is that a byte 0x00 or a 0 character? some more details would definitely help. 2. However, if the page have a counter on it. we found the counter haven't updated. So, it seems that whole jsp page haven't run yet. If the original page isn't returned properly, the counter (often an image) is never referenced, and therefore not updated. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuRGzYACgkQ9CaO5/Lv0PBzXACgwtkDVVe0Wo4L5IHpW3pviDo6 BVUAoK4thjWyP/Ztpry22UNQl0vMtRWo =54pL -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org