Hi All, If we do response.setContentType with 2 diffenret values in the same servlet, will it give exception? I remember that i read somewhere, if we do so, it will give exception, but i am not getting any exception when i try to do it in TomCat. Thanks, Sri.
posted 9 years ago
I think it shouldn't and it will pick the last contentType set using setContentType before calling output stream, but after you get the output stream content type will not be set even if you call setContentType. This is my point of view