Yes you are correct I believe - you must set the contentType prior to writing to out. But ... I am. And, still 2 of my more important pages are not showing the contentType as being defined...those same two pages show a contentLength of 0, and yet those same two pages seem to work perfectly fine.
Well, the real reason I am worried about this is that I heard a rumor that this could affect search engine crawling - that is may prevent some engines from crawling the content. Does anyone know if this is true? Thanks. Neal -----Original Message----- From: David Tildesley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 27, 2002 12:20 AM To: Tomcat Users List Subject: RE: Response.ContentType - not always setting contentType in Header I think you cannot set contenttype after putting out any response body - so double check that you set the content type as the very first thing before sending any response body. HTH -----Original Message----- From: neal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 27 November 2002 8:18 a.m. To: Tomcat Users List Subject: Response.ContentType - not always setting contentType in Header Does anyone know of a reason why response.setContentType() would only sometimes set my content type? I have a single control servlet which sets content type explicitly response.setContentType("text/html"); just before it opens an outputStream and writes an XSLT transformation to out. For 70% of my pages the contentType is correct. For 30% of them (even the pages otherwise work perfectly fine) the header info is messed up. There is no contentType specified and contentLenght is 0. Very strange. In these pages (their control classes I do not do anything specific to the response object that is any different from the other pages. In the XsLTs I specify output as HTML on all the pages. Very confusing. Any thoughts as to why this might happen or how to correct it? I think it may be causing me search engine indexing problems. Thanks. Neal
<<attachment: winmail.dat>>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>