-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chinmay,

On 2/19/2010 7:54 AM, chinmaytotekar wrote:
> I have a servlet and when i call reponse.getWriter().flushBuffer() OR
> reponse.getWriter().println("SOME TEXT"), sometimes it gives following types
> of errors. This error does not occur always but sometimes. What can be the
> reason for this?
> 
> *********** ERROR ************
> java.lang.NullPointerException
>       at 
> org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:267)

Are you setting any headers in your app? Perhaps one of them is NULL.

The servlet API javadoc doesn't say anything about NULL header values,
but they probably shouldn't cause an exception to be thrown.

If you want to find out where you might be setting a header value to
NULL, you can write a Filter to wrap the response and capture the
setHeader and addHeader methods to report a NULL value.

Let me know if you need help writing such a Filter.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt+s1AACgkQ9CaO5/Lv0PArowCgllRE0VvfnjYAynHQA6EaGgoT
fLUAn0SSRisYhnsE6fNyyPXz3cP3VPkc
=E9nr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to