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

Reply via email to