tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: Intro/question possible buglet with Content-Type and Charsets .
Date Fri, 19 Dec 2003 16:34:42 GMT
Greg.Cope@pfizer.com wrote:
>>Greg.Cope@pfizer.com wrote:
>>
>>>Ah this still does not fix it I am afraid.
>>>
>>>Neither does the CVS patch.
>>>
>>>:-(
>>>
>>>Any objections to reopening the bug?
>>
>>Well, yes. Please do not reopen the report. Revisions 1.30 or 1.31 do 
>>(really) resolve the issue.
> 
> 
> Pulled 1.31 from CVS - complied it with some debug statements and it appears
> that Response.java setContentType is being called with:
> application/vnd.ms-excel;charset=ISO-8859-1
> 
> When my code is:
> 
> <%@page contentType="application/vnd.ms-excel"%>

Ok, now I understand. Your problem is that you're trying to generate 
binary data using JSPs. You can't do that, basically (Jasper will always 
use a Writer, and it will also always set the encoding). I'm sure you 
can hack your way around by using the "right" encoding, but you should 
really use a servlet.

There's a "fix" for you though: you can use revision 1.30 or Response, 
which strips out the charset if it's the default encoding.

Rémy


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


Mime
View raw message