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 += "<html><head></head><body bgcolor=\"#D5D5D5\">";
>> str += today.getTime().toString() + "<br><br>";
>> str += "Count value = " + count + "<br>";
>> for(int i=0; i<10000; i++)
>>      str += i + ",";
>> str += "<br>END</body><html>";
>> 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

Reply via email to