tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy George" <rkgeo...@cadmaps.com>
Subject default charset in contentType?
Date Thu, 10 Oct 2002 19:14:20 GMT

Is there a way to turn off the default charset appended to contentType by
Jasper?

	I have installed Tomcat 4.1.10 on a W2K server and I'm trying to display
SVG content with JSP. I have added the image/svg+xml Mime types to my Tomcat
4.1\conf\web.xml file:
    <mime-mapping>
        <extension>svg</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>

	However, when I attempt to set the response type to image/svg+xml in a jsp
page directive the IE6.0 client browser (ASV 3.0 plugin) fails to recognize
jsp generated svg content? Note that static svg content displays fine. This
occurs in even the simplest invocation:
	<%@ page contentType="image/svg+xml" %>
	<?xml version="1.0"?>
	<svg width="100px" height="20px">
  	  <text x="10" y="20">SVG Test</text>
	</svg>

	When I examine the test_jsp.java that comes out of the Jasper Compiler I
can see that the servlet contentType has a default charset appended to the
image/svg+xml i.e.
      response.setContentType("image/svg+xml;charset=ISO-8859-1");

	Curiously if I then compile this Jasper generated servlet and run it I get
the same failure until I remove the ";charset=ISO-8859-1" making the
contentType as follows:
      response.setContentType("image/svg+xml");

	At that point everything works as expected?

	It appears that the Jasper JSP compiler adds a default charset=ISO-8859-1
to the response contentType which does not work with the image/svg+xml MIME
type. I have tried explicitly setting charset in the page directive to
utf-8, windows-1252 etc but it seems that any charset I have tried fails in
the same manner. At this point I would just like to disable the default
charset appended by Jasper.

Thanks
Randy


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


Mime
View raw message