Hi, I have this really drive-me-crazy problem with setting content-type. I'm developing a web-site which uses XHTML DOCTYPE. The problem with XHTML is that not all browsers recognize application/xhtml+xml content-type. So I'm using a filter, that is included in web.xml and that changes response's content-type according to Accept header. The problem is that filter changes content-type but something changes it back to text/html. I mean, I know content-type is changed by filter to application/xhtml+html but results in text/html. Any ideas what the something can be?
You really don't have any choice. The browsers enter their rendering mode based upon the DOCTYPE (or lack thereof). You can muck around with the content type all you want, but it will make no difference. [ December 20, 2007: Message edited by: Bear Bibeault ]