You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roberto Nunnari <nu...@die.supsi.ch> on 2003/05/05 11:05:51 UTC

Don't want tomcat to set 'charset' in http header for a jsp page

Hi there.

Sorry if I'm posting this again.. but till now I got no useful
ansers and my timeline is quite harsh.

Probably my previous mail wasn't very clear in explaining
the problem.. I'll try again here.

I'm using tomcat 4.1.12 to serve kind of xml pages to an application.
I'm using jsp.
I use
<%@page contentType="text/xml"%>
to set the right content type for the client application in the
jsp page.

The problem is that tomcat automatically sets the charset in the
http header with a default value of iso-8859-1 even though I
don't specify a charset in the above page directive.. just
as if I had included the following directive:
<%@page contentType="text/xml; charset=iso-8859-1" %>

That's very sensible if the client is a web broser client,
but the interested client gets very upset with it.. it simply
doesn't want to receive the charset header.
The error message the client gives is:

Content-Type should be "text/xml" and not "text/html; charset=ISO-8859-1"


So.. my problem is not that I want a different encoding.. I know how
to do that..
My problem is that I want tomcat -NOT set- the charset in the http header.


Can any kind soul help me out with a way to have tomcat not to
set the charset header? ..and that should be specific to a web
application.. letting the other webapplications behave as usual..
the ideal would be by using a directive in the .jsp page..

Thanks and best regards.
-- 
               Roberto Nunnari -software engineer-
                 mailto:nunnari@die.supsi.ch
  Scuola Universitaria Professionale della Svizzera Italiana
            Dipartimento di Informatica e Elettronica
                   http://www.die.supsi.ch
  SUPSI-DIE
  Via Cantonale                        tel: +41-91-6108561
  6928 Manno                 """       fax: +41-91-6108570
  Switzerland               (o o)
=======================oOO==(_)==OOo========================


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Don't want tomcat to set 'charset' in http header for a jsp page

Posted by Roberto Nunnari <nu...@die.supsi.ch>.
sorry I have a typo...

Roberto Nunnari wrote:
> The error message the client gives is:
> 
> Content-Type should be "text/xml" and not "text/html; charset=ISO-8859-1"
> 

the real error message the client gives is:

Content-Type should be "text/xml" and not "text/xml; charset=ISO-8859-1"

Sorry for the noise..

Thanks and best regards.
-- 
               Roberto Nunnari -software engineer-
                 mailto:nunnari@die.supsi.ch
  Scuola Universitaria Professionale della Svizzera Italiana
            Dipartimento di Informatica e Elettronica
                   http://www.die.supsi.ch
  SUPSI-DIE
  Via Cantonale                        tel: +41-91-6108561
  6928 Manno                 """       fax: +41-91-6108570
  Switzerland               (o o)
=======================oOO==(_)==OOo========================


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org