Re: content-type without charset
Thank you! I was using a writer and switching to a ServletOutputStream fixed it. I never thought of that: the specs say streams are intended for binary data... Richard Richard Kaye wrote: Please could someone help me by posting a Hello-world servlet that serves a document with this Content-Type header? I have tried all the obvious things with no success... Are you using a writer? If so, try using the stream instead. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: content-type without charset
Richard Kaye wrote: Thank you! I was using a writer and switching to a ServletOutputStream fixed it. I never thought of that: the specs say streams are intended for binary data... They do. They also say if you use a writer Tomcat must append a charset to the Content-Type header. Glad this works now. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: content-type without charset
Incidently, the fact that tomcat seems to remove any space between the ; and charset in mimetype; charset=... whereas apache seems to prefer to add one is an annoying inconsistency that has blocked a much simpler workaround for my difficulties (one that would have used text/xml). No matter. My next step is to link in the velocity engine. Funnily enough, this requires a Writer object, whereas I now have a ServletOutputStream. I guess I will have to use the constructor in java.io.OutputStreamWriter since I cannot use the more direct getWriter() method! Ironic isn't it? Apart from the fact I have to specify the charset carefully, can you foresee any possible problems? Thanks for all the help, it's very much appreciated. Richard Richard Kaye wrote: Thank you! I was using a writer and switching to a ServletOutputStream fixed it. I never thought of that: the specs say streams are intended for binary data... They do. They also say if you use a writer Tomcat must append a charset to the Content-Type header. Glad this works now. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
content-type without charset
Hi I have been tearing my hair out recently with an annoying problem. I want to serve XHTML+MathML documents from a servlet. The problem is that it seems that these can only be viewed with IE and the plugin (MathPlayer) if the server sends Content-Type: application/xhtml+xml in the HTTP header without specifying a charset. Every possible charset screws things up because of - I presume - the mime type recogniser built in to IE is not triggering the MathPlayer filter correctly when a charset is present in the Content-Type header. Unfortunately I have not found a way to stop Tomcat in adding some unwanted default charset (I am using Tomcat 5.5), and unless Microsoft decide to make IE open source in the very near future this seems to be my only chance of a workaround. Please could someone help me by posting a Hello-world servlet that serves a document with this Content-Type header? I have tried all the obvious things with no success... Thanks Richard - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: content-type without charset
Richard Kaye wrote: Please could someone help me by posting a Hello-world servlet that serves a document with this Content-Type header? I have tried all the obvious things with no success... Are you using a writer? If so, try using the stream instead. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]